kopia lustrzana https://github.com/ryukoposting/Signal-Android
Always get the storage manifest for internal users.
This will hopefully help us track down some of the validation issues when writing local changes.fork-5.53.8
rodzic
281630e751
commit
b4d0dde129
|
@ -217,7 +217,7 @@ public class StorageSyncJobV2 extends BaseJob {
|
||||||
boolean needsMultiDeviceSync = false;
|
boolean needsMultiDeviceSync = false;
|
||||||
boolean needsForcePush = false;
|
boolean needsForcePush = false;
|
||||||
long localManifestVersion = TextSecurePreferences.getStorageManifestVersion(context);
|
long localManifestVersion = TextSecurePreferences.getStorageManifestVersion(context);
|
||||||
Optional<SignalStorageManifest> remoteManifest = accountManager.getStorageManifestIfDifferentVersion(storageServiceKey, localManifestVersion);
|
Optional<SignalStorageManifest> remoteManifest = FeatureFlags.internalUser() ? accountManager.getStorageManifest(storageServiceKey) : accountManager.getStorageManifestIfDifferentVersion(storageServiceKey, localManifestVersion);
|
||||||
long remoteManifestVersion = remoteManifest.transform(SignalStorageManifest::getVersion).or(localManifestVersion);
|
long remoteManifestVersion = remoteManifest.transform(SignalStorageManifest::getVersion).or(localManifestVersion);
|
||||||
|
|
||||||
stopwatch.split("remote-manifest");
|
stopwatch.split("remote-manifest");
|
||||||
|
@ -347,7 +347,7 @@ public class StorageSyncJobV2 extends BaseJob {
|
||||||
Log.i(TAG, "[Remote Sync] Updating local manifest version to: " + remoteManifest.get().getVersion());
|
Log.i(TAG, "[Remote Sync] Updating local manifest version to: " + remoteManifest.get().getVersion());
|
||||||
TextSecurePreferences.setStorageManifestVersion(context, remoteManifest.get().getVersion());
|
TextSecurePreferences.setStorageManifestVersion(context, remoteManifest.get().getVersion());
|
||||||
}
|
}
|
||||||
} else if (remoteManifest.isPresent()) {
|
} else if (remoteManifest.isPresent() && remoteManifestVersion < localManifestVersion) {
|
||||||
Log.w(TAG, "[Remote Sync] Remote version was older. User might have switched accounts. Making our version match.");
|
Log.w(TAG, "[Remote Sync] Remote version was older. User might have switched accounts. Making our version match.");
|
||||||
TextSecurePreferences.setStorageManifestVersion(context, remoteManifestVersion);
|
TextSecurePreferences.setStorageManifestVersion(context, remoteManifestVersion);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue