Skip to content

Commit

Permalink
fix(SDK-3694): Fix wrong tlc format in queue header
Browse files Browse the repository at this point in the history
  • Loading branch information
vasct committed Feb 27, 2024
1 parent bc2d99c commit e584fd3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ public JSONArray getInAppsCount(final Context context) {
final SharedPreferences prefs = StorageHelper
.getPreferences(context, storageKeyWithSuffix(getKeyWithDeviceId(Constants.KEY_COUNTS_PER_INAPP, deviceId)));
final Map<String, ?> all = prefs.getAll();
for (Map.Entry<String,?> inapp : all.entrySet()) {
if (inapp.getValue() instanceof String) {
final String[] parts = ((String) inapp.getValue()).split(",");
for (Map.Entry<String, ?> inApp : all.entrySet()) {
//inApp: "targetID" -> "todayCount,lifetime"
if (inApp.getValue() instanceof String) {
final String[] parts = ((String) inApp.getValue()).split(",");
if (parts.length == 2) {
JSONArray a = new JSONArray();
a.put(0, inapp);
a.put(0, inApp.getKey());
a.put(1, Integer.parseInt(parts[0]));
a.put(2, Integer.parseInt(parts[1]));
arr.put(a);
Expand Down

0 comments on commit e584fd3

Please sign in to comment.