File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
src/main/java/com/segment/analytics/kotlin/consent Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ android {
1616
1717 defaultConfig {
1818 multiDexEnabled = true
19- minSdk = 24
19+ minSdk = 16
2020 targetSdk = 33
2121
2222 testInstrumentationRunner = " android.support.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ open class ConsentBlocker(
6666 val categoryPreferenceJson = consentJsonObject[CATEGORY_PREFERENCE_KEY ]
6767 if (categoryPreferenceJson != null ) {
6868 val categoryPreferenceJsonObject = categoryPreferenceJson as JsonObject
69- categoryPreferenceJsonObject.forEach { category, consentGiven ->
69+ for (( category, consentGiven) in categoryPreferenceJsonObject) {
7070 if (consentGiven.toString() == " true" ) {
7171 // Add this category to the list of necessary categories
7272 consentJsonArray.add(category)
Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ class ConsentManager(
9797 val allCategories = mutableListOf<String >()
9898 var enabledAtSegment = true
9999
100- // Add all mappings
101- settings.integrations.forEach { integrationName, integrationJson ->
100+
101+ for (( integrationName, integrationJson) in settings.integrations) {
102102 // If the integration has the consent key:
103103 integrationJson.jsonObject[CONSENT_SETTINGS_KEY ]?.let {
104104
@@ -164,7 +164,7 @@ class ConsentManager(
164164 */
165165 private fun stampEvent (event : BaseEvent ) {
166166 event.context = buildJsonObject {
167- event.context.forEach { key, json ->
167+ for (( key, json) in event.context) {
168168 put(key, json)
169169 }
170170 put(CONSENT_KEY , buildJsonObject {
You can’t perform that action at this time.
0 commit comments