diff options
author | Alexandra Gherghina <alexgherghina@google.com> | 2014-07-15 23:11:48 +0100 |
---|---|---|
committer | Alexandra Gherghina <alexgherghina@google.com> | 2014-07-22 20:15:45 +0000 |
commit | 0e9ac20d7e0c9aca8cd342d97465adfac4c7e6e1 (patch) | |
tree | 57e755963135f2ddbc58d02f6de9c1619c4df211 /core/java | |
parent | b192a1762a15fd2f0ac8340fef572bd1717c24a7 (diff) | |
download | frameworks_base-0e9ac20d7e0c9aca8cd342d97465adfac4c7e6e1.zip frameworks_base-0e9ac20d7e0c9aca8cd342d97465adfac4c7e6e1.tar.gz frameworks_base-0e9ac20d7e0c9aca8cd342d97465adfac4c7e6e1.tar.bz2 |
Do Not Merge Per-user API for master sync
Change-Id: I6a8088eb3bfddae4c8e38904dd26baf3c7c09c9e
(cherry picked from commit 222aea8bd997807784dc99ca53f63280d384fdf0)
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/content/ContentResolver.java | 10 | ||||
-rw-r--r-- | core/java/android/content/IContentService.aidl | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index de3b881..87d14b9 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -2153,8 +2153,16 @@ public abstract class ContentResolver { * @param sync the master auto-sync setting that applies to all the providers and accounts */ public static void setMasterSyncAutomatically(boolean sync) { + setMasterSyncAutomaticallyAsUser(sync, UserHandle.getCallingUserId()); + } + + /** + * @see #setMasterSyncAutomatically(boolean) + * @hide + */ + public static void setMasterSyncAutomaticallyAsUser(boolean sync, int userId) { try { - getContentService().setMasterSyncAutomatically(sync); + getContentService().setMasterSyncAutomaticallyAsUser(sync, userId); } catch (RemoteException e) { // exception ignored; if this is thrown then it means the runtime is in the midst of // being restarted diff --git a/core/java/android/content/IContentService.aidl b/core/java/android/content/IContentService.aidl index d363ad1..9998f08 100644 --- a/core/java/android/content/IContentService.aidl +++ b/core/java/android/content/IContentService.aidl @@ -128,6 +128,7 @@ interface IContentService { void setIsSyncable(in Account account, String providerName, int syncable); void setMasterSyncAutomatically(boolean flag); + void setMasterSyncAutomaticallyAsUser(boolean flag, int userId); boolean getMasterSyncAutomatically(); boolean getMasterSyncAutomaticallyAsUser(int userId); |