mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Update to latest backup tests.
This commit is contained in:
committed by
jeffrey-signal
parent
ae4a3433f9
commit
8783d69406
@@ -62,6 +62,7 @@ class BackupValues(store: KeyValueStore) : SignalStoreValues(store) {
|
||||
private const val KEY_RESTORE_OVER_CELLULAR = "backup.restore.useCellular"
|
||||
private const val KEY_OPTIMIZE_STORAGE = "backup.optimizeStorage"
|
||||
private const val KEY_BACKUPS_INITIALIZED = "backup.initialized"
|
||||
private const val KEY_IMPORTED_EMPTY_ANDROID_SETTINGS = "backup.importedEmptyAndroidSettings"
|
||||
|
||||
const val KEY_ARCHIVE_UPLOAD_STATE = "backup.archiveUploadState"
|
||||
|
||||
@@ -422,6 +423,11 @@ class BackupValues(store: KeyValueStore) : SignalStoreValues(store) {
|
||||
.apply()
|
||||
}
|
||||
|
||||
/**
|
||||
* An annoying workaround to making tests pass when importing empty androidSpecificSettings.
|
||||
*/
|
||||
var importedEmptyAndroidSettings by booleanValue(KEY_IMPORTED_EMPTY_ANDROID_SETTINGS, false)
|
||||
|
||||
/**
|
||||
* If set, this represents how far back we should backup messages. For instance, if the returned value is 1 year in milliseconds, you should back up
|
||||
* every message within the last year. If unset, back up all messages. We only cutoff old messages for users whose backup is over the
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.dependencies.AppDependencies;
|
||||
import org.thoughtcrime.securesms.mms.SentMediaQuality;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.util.Environment;
|
||||
import org.thoughtcrime.securesms.util.SingleLiveEvent;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.webrtc.CallDataMode;
|
||||
@@ -83,7 +84,7 @@ public final class SettingsValues extends SignalStoreValues {
|
||||
SettingsValues(@NonNull KeyValueStore store, Context context) {
|
||||
super(store);
|
||||
|
||||
if (!store.containsKey(SCREEN_LOCK_ENABLED)) {
|
||||
if (!store.containsKey(SCREEN_LOCK_ENABLED) && !Environment.IS_INSTRUMENTATION) {
|
||||
migrateFromSharedPrefsV1(context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user