mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Add support for the ManifestRecord.sourceDevice field.
This commit is contained in:
@@ -108,7 +108,7 @@ public class StorageForcePushJob extends BaseJob {
|
||||
inserts.add(accountRecord);
|
||||
allNewStorageIds.add(accountRecord.getId());
|
||||
|
||||
SignalStorageManifest manifest = new SignalStorageManifest(newVersion, allNewStorageIds);
|
||||
SignalStorageManifest manifest = new SignalStorageManifest(newVersion, SignalStore.account().getDeviceId(), allNewStorageIds);
|
||||
StorageSyncValidations.validateForcePush(manifest, inserts, Recipient.self().fresh());
|
||||
|
||||
try {
|
||||
|
||||
@@ -245,7 +245,7 @@ public class StorageSyncJob extends BaseJob {
|
||||
self = freshSelf();
|
||||
}
|
||||
|
||||
Log.i(TAG, "Our version: " + localManifest.getVersion() + ", their version: " + remoteManifest.getVersion());
|
||||
Log.i(TAG, "Our version: " + localManifest.getVersionString() + ", their version: " + remoteManifest.getVersionString());
|
||||
|
||||
if (remoteManifest.getVersion() > localManifest.getVersion()) {
|
||||
Log.i(TAG, "[Remote Sync] Newer manifest version found!");
|
||||
@@ -314,7 +314,7 @@ public class StorageSyncJob extends BaseJob {
|
||||
}
|
||||
|
||||
if (remoteManifest != localManifest) {
|
||||
Log.i(TAG, "[Remote Sync] Saved new manifest. Now at version: " + remoteManifest.getVersion());
|
||||
Log.i(TAG, "[Remote Sync] Saved new manifest. Now at version: " + remoteManifest.getVersionString());
|
||||
SignalStore.storageService().setManifest(remoteManifest);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ public class StorageSyncJob extends BaseJob {
|
||||
|
||||
Log.i(TAG, "ID Difference :: " + idDifference);
|
||||
|
||||
remoteWriteOperation = new WriteOperationResult(new SignalStorageManifest(remoteManifest.getVersion() + 1, localStorageIds),
|
||||
remoteWriteOperation = new WriteOperationResult(new SignalStorageManifest(remoteManifest.getVersion() + 1, SignalStore.account().getDeviceId(), localStorageIds),
|
||||
remoteInserts,
|
||||
remoteDeletes);
|
||||
|
||||
@@ -361,14 +361,14 @@ public class StorageSyncJob extends BaseJob {
|
||||
throw new RetryLaterException();
|
||||
}
|
||||
|
||||
Log.i(TAG, "Saved new manifest. Now at version: " + remoteWriteOperation.getManifest().getVersion());
|
||||
Log.i(TAG, "Saved new manifest. Now at version: " + remoteWriteOperation.getManifest().getVersionString());
|
||||
SignalStore.storageService().setManifest(remoteWriteOperation.getManifest());
|
||||
|
||||
stopwatch.split("remote-write");
|
||||
|
||||
needsMultiDeviceSync = true;
|
||||
} else {
|
||||
Log.i(TAG, "No remote writes needed. Still at version: " + remoteManifest.getVersion());
|
||||
Log.i(TAG, "No remote writes needed. Still at version: " + remoteManifest.getVersionString());
|
||||
}
|
||||
|
||||
List<Integer> knownTypes = getKnownTypes();
|
||||
|
||||
Reference in New Issue
Block a user