summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorAlexandra Gherghina <alexgherghina@google.com>2014-07-15 23:11:48 +0100
committerAlexandra Gherghina <alexgherghina@google.com>2014-07-22 20:15:45 +0000
commit0e9ac20d7e0c9aca8cd342d97465adfac4c7e6e1 (patch)
tree57e755963135f2ddbc58d02f6de9c1619c4df211 /core/java
parentb192a1762a15fd2f0ac8340fef572bd1717c24a7 (diff)
downloadframeworks_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.java10
-rw-r--r--core/java/android/content/IContentService.aidl1
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);