Skip to content

Commit f0b7e2a

Browse files
Downgraded minSdk version from 24 to 16
1 parent 7614edc commit f0b7e2a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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"

lib/src/main/java/com/segment/analytics/kotlin/consent/ConsentBlocker.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

lib/src/main/java/com/segment/analytics/kotlin/consent/ConsentManager.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)