mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Use remote config v2.
This commit is contained in:
committed by
Jeffrey Starke
parent
dcce8ea35a
commit
7d35cf1374
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user