Migrate PeriodicSyncs from old format
Periodic syncs that were stored in a file in earlier versions should be read and added to JobScheduler when device boots. Bug: 27261455 Change-Id: I626ce468afc35e5c3c6defd583a0963cc71fc58a
This commit is contained in:
@@ -2271,6 +2271,7 @@ public class SyncManager {
|
||||
void checkIfDeviceReady() {
|
||||
if (mProvisioned && mBootCompleted) {
|
||||
synchronized(this) {
|
||||
mSyncStorageEngine.restoreAllPeriodicSyncs();
|
||||
// Dispatch any stashed messages.
|
||||
obtainMessage(MESSAGE_RELEASE_MESSAGES_FROM_QUEUE).sendToTarget();
|
||||
}
|
||||
@@ -2622,7 +2623,6 @@ public class SyncManager {
|
||||
}
|
||||
if (mBootCompleted) {
|
||||
doDatabaseCleanup();
|
||||
mSyncStorageEngine.restoreAllPeriodicSyncs();
|
||||
}
|
||||
|
||||
AccountAndUser[] accounts = mRunningAccounts;
|
||||
|
||||
Reference in New Issue
Block a user