OSDN Git Service

Make sync settings restore more robust
authorMatthew Williams <mjwilliams@google.com>
Thu, 11 Jun 2015 03:06:37 +0000 (20:06 -0700)
committerMatthew Williams <mjwilliams@google.com>
Tue, 16 Jun 2015 21:46:59 +0000 (14:46 -0700)
commit53abfdb86c2bf834777dbda61fc46083a93a4a83
tree68a08a53c7d1bdea20fdae463db4f18a7c27967b
parent892850396c21db891df784c0e1bb78115feee908
Make sync settings restore more robust

Bug: 18506992
Parent Bug: 17967106
Introduce a new state for ContentResolver#getIsSyncable.
This state specifies that an adapter should be disabled until
explicitly turned on by ContentResolver#setSyncAutomatically(true).
In this way we can restore disabled sync adapters and still allow
them to run their initialization logic later on when they are
re-enabled.

Change-Id: I03fd1f994c4bc982bbc723154ba20bb252efdf80
core/java/com/android/server/backup/AccountSyncSettingsBackupHelper.java
services/core/java/com/android/server/content/SyncManager.java
services/core/java/com/android/server/content/SyncStorageEngine.java