Add storage support for the AccountRecord.

This commit is contained in:
Greyson Parrelli
2020-03-18 16:31:45 -04:00
parent 7a038ab09d
commit 951a61117a
38 changed files with 1290 additions and 335 deletions

View File

@@ -18,7 +18,6 @@ public final class SignalStore {
public static void onFirstEverAppLaunch() {
registrationValues().onFirstEverAppLaunch();
storageServiceValues().setFirstStorageSyncCompleted(false);
}
public static @NonNull KbsValues kbsValues() {

View File

@@ -9,9 +9,8 @@ import java.security.SecureRandom;
public class StorageServiceValues {
private static final String STORAGE_MASTER_KEY = "storage.storage_master_key";
private static final String FIRST_STORAGE_SYNC_COMPLETED = "storage.first_storage_sync_completed";
private static final String LAST_SYNC_TIME = "storage.last_sync_time";
private static final String STORAGE_MASTER_KEY = "storage.storage_master_key";
private static final String LAST_SYNC_TIME = "storage.last_sync_time";
private final KeyValueStore store;
@@ -38,14 +37,6 @@ public class StorageServiceValues {
.commit();
}
public boolean hasFirstStorageSyncCompleted() {
return !FeatureFlags.storageServiceRestore() || store.getBoolean(FIRST_STORAGE_SYNC_COMPLETED, true);
}
public void setFirstStorageSyncCompleted(boolean completed) {
store.beginWrite().putBoolean(FIRST_STORAGE_SYNC_COMPLETED, completed).apply();
}
public long getLastSyncTime() {
return store.getLong(LAST_SYNC_TIME, 0);
}