summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shreyas Basarge <snb@google.com> 2016-02-19 23:51:40 +0000
committer Shreyas Basarge <snb@google.com> 2016-02-19 23:55:37 +0000
commit3147bbc164d0b69d35caea05dfa3fb4fd86e2b61 (patch)
tree8c869be3436d03b7f561a4c29ccc27c5af9e107c
parent44da29407f3228811d5c1387a184fc68c388c5c7 (diff)
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
-rw-r--r--services/core/java/com/android/server/content/SyncManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index 0d974344a432..d8921d8cbdb7 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -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;