Skip to content

Commit b27b094

Browse files
authored
task(SDK-5080) - release v7.8.0 (#580)
Converts .kt file to .java file as a hack around scoping and access
1 parent a922f05 commit b27b094

File tree

4 files changed

+41
-31
lines changed

4 files changed

+41
-31
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.leanplum.utils;
2+
3+
import android.annotation.SuppressLint;
4+
5+
import com.clevertap.android.sdk.CleverTapAPI;
6+
import com.clevertap.android.sdk.CleverTapInstanceConfig;
7+
import com.clevertap.android.sdk.LocalDataStore;
8+
import com.clevertap.android.sdk.task.CTExecutorFactory;
9+
import com.clevertap.android.sdk.task.CTExecutors;
10+
import java.util.HashMap;
11+
import java.util.Map;
12+
13+
public class CTUtils {
14+
15+
@SuppressLint("RestrictedApi")
16+
public static void ensureLocalDataStoreValue(String key, CleverTapAPI cleverTapApi) {
17+
LocalDataStore localDataStore = cleverTapApi.getCoreState().getLocalDataStore();
18+
Object value = localDataStore.getProfileProperty(key);
19+
if (value == null) {
20+
Map<String, Object> map = new HashMap<>();
21+
map.put(key, "");
22+
localDataStore.updateProfileFields(map);
23+
}
24+
}
25+
26+
@SuppressLint("RestrictedApi")
27+
public static void addMultiValueForKey(String key, String value, CleverTapAPI cleverTapApi) {
28+
CleverTapInstanceConfig config = cleverTapApi.getCoreState().getConfig();
29+
30+
CTExecutors executors = CTExecutorFactory.executors(config);
31+
executors
32+
.postAsyncSafelyTask()
33+
.execute("CTUtils", () -> {
34+
ensureLocalDataStoreValue(key, cleverTapApi);
35+
cleverTapApi.addMultiValueForKey(key, value);
36+
return null;
37+
});
38+
}
39+
}

AndroidSDKCore/src/main/java/com/leanplum/utils/CTUtils.kt

Lines changed: 0 additions & 29 deletions
This file was deleted.

common-methods.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ext {
33
COMPILE_SDK_VERSION = 35
44
APPCOMPAT_LIBRARY_VERSION = '1.7.0'
5-
CT_SDK_VERSION = '7.3.1'
5+
CT_SDK_VERSION = '7.5.0'
66
MIN_SDK_VERSION = 21
77
JAVA_VERSION = JavaVersion.VERSION_1_8
88

sdk-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.7.0
1+
7.8.0

0 commit comments

Comments
 (0)