diff options
author | Costin Manolache <costin@google.com> | 2009-09-02 18:03:05 -0700 |
---|---|---|
committer | Costin Manolache <costin@google.com> | 2009-09-08 14:05:43 -0700 |
commit | b752098e8d12d6e7925d97458078dbb896ca8a05 (patch) | |
tree | 533da6e8662831ef9c7f63fede341db59952b573 /core/java/android/content/ContentService.java | |
parent | 33b69050b2074c1768c45895418f0454e52e279a (diff) | |
download | frameworks_base-b752098e8d12d6e7925d97458078dbb896ca8a05.zip frameworks_base-b752098e8d12d6e7925d97458078dbb896ca8a05.tar.gz frameworks_base-b752098e8d12d6e7925d97458078dbb896ca8a05.tar.bz2 |
Sync status was ignoring account - the new UI has specific sync status for each account, so we need to use it.
Diffstat (limited to 'core/java/android/content/ContentService.java')
-rw-r--r-- | core/java/android/content/ContentService.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/core/java/android/content/ContentService.java b/core/java/android/content/ContentService.java index f742448..974a667 100644 --- a/core/java/android/content/ContentService.java +++ b/core/java/android/content/ContentService.java @@ -241,7 +241,7 @@ public final class ContentService extends IContentService.Stub { restoreCallingIdentity(identityToken); } } - + public boolean getSyncAutomatically(Account account, String providerName) { mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_SETTINGS, "no permission to read the sync settings"); @@ -318,7 +318,7 @@ public final class ContentService extends IContentService.Stub { } return false; } - + public void setMasterSyncAutomatically(boolean flag) { mContext.enforceCallingOrSelfPermission(Manifest.permission.WRITE_SYNC_SETTINGS, "no permission to write the sync settings"); @@ -348,7 +348,7 @@ public final class ContentService extends IContentService.Stub { } return false; } - + public ActiveSyncInfo getActiveSync() { mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_STATS, "no permission to read the sync stats"); @@ -363,7 +363,7 @@ public final class ContentService extends IContentService.Stub { } return null; } - + public SyncStatusInfo getSyncStatus(Account account, String authority) { mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_STATS, "no permission to read the sync stats"); @@ -371,15 +371,15 @@ public final class ContentService extends IContentService.Stub { try { SyncManager syncManager = getSyncManager(); if (syncManager != null) { - return syncManager.getSyncStorageEngine().getStatusByAuthority( - authority); + return syncManager.getSyncStorageEngine().getStatusByAccountAndAuthority( + account, authority); } } finally { restoreCallingIdentity(identityToken); } return null; } - + public boolean isSyncPending(Account account, String authority) { mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_STATS, "no permission to read the sync stats"); @@ -394,7 +394,7 @@ public final class ContentService extends IContentService.Stub { } return false; } - + public void addStatusChangeListener(int mask, ISyncStatusObserver callback) { long identityToken = clearCallingIdentity(); try { @@ -406,7 +406,7 @@ public final class ContentService extends IContentService.Stub { restoreCallingIdentity(identityToken); } } - + public void removeStatusChangeListener(ISyncStatusObserver callback) { long identityToken = clearCallingIdentity(); try { @@ -418,7 +418,7 @@ public final class ContentService extends IContentService.Stub { restoreCallingIdentity(identityToken); } } - + public static IContentService main(Context context, boolean factoryTest) { ContentService service = new ContentService(context, factoryTest); ServiceManager.addService(ContentResolver.CONTENT_SERVICE_NAME, service); |