Skip to content

Commit c48728c

Browse files
authored
Merge pull request #337 from Countly/fix_h
fix: enable caching via configuration
2 parents 9f69da3 + d9f43db commit c48728c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* During an internal timer tick
55
* Upon flushing the event queue
66

7+
* Mitigated an issue where remote config values caching was changing by device id change, not anymore. It is linked to the configuration "enableRemoteConfigValueCaching" now.
78
* Mitigated an issue related to the device ID by creating an internal migration.
89
* Resolved a problem where revoked consents were sent after changes without merging.
910
* Fixed a bug that caused the device ID to be incorrectly set after changes with merging.

sdk/src/main/java/ly/count/android/sdk/ModuleDeviceId.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void changeDeviceIdWithoutMergeInternal(@NonNull String deviceId) {
129129
_cly.moduleUserProfile.saveInternal();
130130

131131
//update remote config_ values after id change if automatic update is enabled
132-
_cly.moduleRemoteConfig.clearAndDownloadAfterIdChange(true);
132+
_cly.moduleRemoteConfig.clearAndDownloadAfterIdChange();
133133

134134
_cly.moduleSessions.endSessionInternal();
135135

@@ -189,7 +189,7 @@ void changeDeviceIdWithMergeInternal(@NonNull String deviceId) {
189189
// in both cases we act the same as the temporary ID requests will be updated with the final ID later
190190

191191
//update remote config_ values after id change if automatic update is enabled
192-
_cly.moduleRemoteConfig.clearAndDownloadAfterIdChange(false);
192+
_cly.moduleRemoteConfig.clearAndDownloadAfterIdChange();
193193
requestQueueProvider.changeDeviceId(deviceId, deviceIdInstance.getCurrentId());
194194
deviceIdInstance.changeToCustomId(deviceId);
195195
_cly.notifyDeviceIdChange();

sdk/src/main/java/ly/count/android/sdk/ModuleRemoteConfig.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,11 @@ void clearValueStoreInternal() {
381381
return variantResponse;
382382
}
383383

384-
void clearAndDownloadAfterIdChange(boolean valuesShouldBeCacheCleared) {
385-
L.v("[RemoteConfig] Clearing remote config values and preparing to download after ID update, " + valuesShouldBeCacheCleared);
384+
void clearAndDownloadAfterIdChange() {
385+
L.v("[RemoteConfig] Clearing remote config values and preparing to download after ID update");
386+
387+
CacheOrClearRCValuesIfNeeded();
386388

387-
if (valuesShouldBeCacheCleared) {
388-
CacheOrClearRCValuesIfNeeded();
389-
}
390389
if (automaticDownloadTriggersEnabled && consentProvider.getConsent(Countly.CountlyFeatureNames.remoteConfig)) {
391390
updateRemoteConfigAfterIdChange = true;
392391
}

0 commit comments

Comments
 (0)