Use remote config v2.

This commit is contained in:
Michelle Tang
2025-08-19 17:15:38 -04:00
committed by Jeffrey Starke
parent dcce8ea35a
commit 7d35cf1374
9 changed files with 121 additions and 139 deletions

View File

@@ -14,6 +14,7 @@ public final class RemoteConfigValues extends SignalStoreValues {
private static final String CURRENT_CONFIG = "remote_config";
private static final String PENDING_CONFIG = "pending_remote_config";
private static final String LAST_FETCH_TIME = "remote_config_last_fetch_time";
private static final String ETAG = "etag";
RemoteConfigValues(@NonNull KeyValueStore store) {
super(store);
@@ -51,4 +52,12 @@ public final class RemoteConfigValues extends SignalStoreValues {
public void setLastFetchTime(long time) {
putLong(LAST_FETCH_TIME, time);
}
public String getETag() {
return getString(ETAG, "");
}
public void setETag(String etag) {
putString(ETAG, etag);
}
}

View File

@@ -151,6 +151,8 @@ class SignalStore(context: Application, private val store: KeyValueStore) {
val pin: PinValues
get() = instance!!.pinValues
@JvmStatic
@get:JvmName("remoteConfig")
val remoteConfig: RemoteConfigValues
get() = instance!!.remoteConfigValues