Add internal preference to disable storage syncing.

Added to help debug certain scenarios, particularly around working with
emulator snapshots, since storage sync will often bring in state from earlier
snapshots you weren't expecting.
This commit is contained in:
Greyson Parrelli
2021-09-16 13:32:19 -04:00
parent 5d5063ef5f
commit 6c3e1b6a29
6 changed files with 32 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ public final class InternalValues extends SignalStoreValues {
public static final String DELAY_RESENDS = "internal.delay_resends";
public static final String CALLING_SERVER = "internal.calling_server";
public static final String SHAKE_TO_REPORT = "internal.shake_to_report";
public static final String DISABLE_STORAGE_SERVICE = "internal.disable_storage_service";
InternalValues(KeyValueStore store) {
super(store);
@@ -131,6 +132,13 @@ public final class InternalValues extends SignalStoreValues {
return FeatureFlags.internalUser() && getBoolean(SHAKE_TO_REPORT, true);
}
/**
* Whether or not storage service is manually disabled.
*/
public synchronized boolean storageServiceDisabled() {
return FeatureFlags.internalUser() && getBoolean(DISABLE_STORAGE_SERVICE, false);
}
/**
* The selected group calling server to use.
* <p>