Merge "Migrate PeriodicSyncs from old format" into nyc-dev

This commit is contained in:
Shreyas Basarge
2016-02-22 16:48:01 +00:00
committed by Android (Google) Code Review

View File

@@ -2271,6 +2271,7 @@ public class SyncManager {
void checkIfDeviceReady() { void checkIfDeviceReady() {
if (mProvisioned && mBootCompleted) { if (mProvisioned && mBootCompleted) {
synchronized(this) { synchronized(this) {
mSyncStorageEngine.restoreAllPeriodicSyncs();
// Dispatch any stashed messages. // Dispatch any stashed messages.
obtainMessage(MESSAGE_RELEASE_MESSAGES_FROM_QUEUE).sendToTarget(); obtainMessage(MESSAGE_RELEASE_MESSAGES_FROM_QUEUE).sendToTarget();
} }
@@ -2622,7 +2623,6 @@ public class SyncManager {
} }
if (mBootCompleted) { if (mBootCompleted) {
doDatabaseCleanup(); doDatabaseCleanup();
mSyncStorageEngine.restoreAllPeriodicSyncs();
} }
AccountAndUser[] accounts = mRunningAccounts; AccountAndUser[] accounts = mRunningAccounts;