Improve network reliability during resumable uploads.

This commit is contained in:
Greyson Parrelli
2020-10-13 17:37:14 -04:00
parent 322c139c26
commit 84ec6dd458
10 changed files with 52 additions and 167 deletions

View File

@@ -9,6 +9,7 @@ public final class InternalValues extends SignalStoreValues {
public static final String GV2_IGNORE_SERVER_CHANGES = "internal.gv2.ignore_server_changes";
public static final String GV2_IGNORE_P2P_CHANGES = "internal.gv2.ignore_p2p_changes";
public static final String RECIPIENT_DETAILS = "internal.recipient_details";
public static final String FORCE_CENSORSHIP = "internal.force_censorship";
InternalValues(KeyValueStore store) {
super(store);
@@ -59,4 +60,11 @@ public final class InternalValues extends SignalStoreValues {
public synchronized boolean recipientDetails() {
return FeatureFlags.internalUser() && getBoolean(RECIPIENT_DETAILS, false);
}
/**
* Force the app to behave as if it is in a country where Signal is censored.
*/
public synchronized boolean forcedCensorship() {
return FeatureFlags.internalUser() && getBoolean(FORCE_CENSORSHIP, false);
}
}

View File

@@ -29,7 +29,7 @@ public final class SignalStore {
private final PhoneNumberPrivacyValues phoneNumberPrivacyValues;
private SignalStore() {
this.store = ApplicationDependencies.getKeyValueStore();
this.store = new KeyValueStore(ApplicationDependencies.getApplication());
this.kbsValues = new KbsValues(store);
this.registrationValues = new RegistrationValues(store);
this.pinValues = new PinValues(store);