diff options
author | Fred Quintana <fredq@google.com> | 2010-03-30 15:16:21 -0700 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2010-03-30 17:31:52 -0700 |
commit | d5e4fdc8a4743abc0d9fe3cb952a78f9ad078c6b (patch) | |
tree | 368fa8665a93e3e524b0d020fe33f5febb58661d /core/java/android/content/SyncStorageEngine.java | |
parent | 8acdb911f4b9c38d1cafd3ab464d6bec54564c84 (diff) | |
download | frameworks_base-d5e4fdc8a4743abc0d9fe3cb952a78f9ad078c6b.zip frameworks_base-d5e4fdc8a4743abc0d9fe3cb952a78f9ad078c6b.tar.gz frameworks_base-d5e4fdc8a4743abc0d9fe3cb952a78f9ad078c6b.tar.bz2 |
some changes due to an API review
- make EntityIterator extend Iterator and thus not throw a
RemoteException, instead converting it into a RuntimeException.
- rename ActiveSyncInfo to SyncInfo
- change getActiveSync to getCurrentSync
- remove the accessors in SyncInfo and instead make the final
fields publicly accessible
- made AbstractThreadedSyncAdapter.cancelSync not take a thread
Change-Id: I99fde5585bc5f1e95f4873ffbba189074a8d6372
http://b/issue?id=2553539
http://b/issue?id=2553541
http://b/issue?id=2553550
Diffstat (limited to 'core/java/android/content/SyncStorageEngine.java')
-rw-r--r-- | core/java/android/content/SyncStorageEngine.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java index 6a959ae..c848a00 100644 --- a/core/java/android/content/SyncStorageEngine.java +++ b/core/java/android/content/SyncStorageEngine.java @@ -230,7 +230,7 @@ public class SyncStorageEngine extends Handler { private final ArrayList<PendingOperation> mPendingOperations = new ArrayList<PendingOperation>(); - private ActiveSyncInfo mActiveSync; + private SyncInfo mCurrentSync; private final SparseArray<SyncStatusInfo> mSyncStatus = new SparseArray<SyncStatusInfo>(); @@ -678,8 +678,8 @@ public class SyncStorageEngine extends Handler { } } - if (mActiveSync != null) { - AuthorityInfo ainfo = getAuthority(mActiveSync.getAuthorityId()); + if (mCurrentSync != null) { + AuthorityInfo ainfo = getAuthority(mCurrentSync.authorityId); if (ainfo != null && ainfo.account.equals(account) && ainfo.authority.equals(authority)) { return true; @@ -864,7 +864,7 @@ public class SyncStorageEngine extends Handler { + " auth=" + activeSyncContext.mSyncOperation.authority + " src=" + activeSyncContext.mSyncOperation.syncSource + " extras=" + activeSyncContext.mSyncOperation.extras); - if (mActiveSync != null) { + if (mCurrentSync != null) { Log.w(TAG, "setActiveSync called with existing active sync!"); } AuthorityInfo authority = getAuthorityLocked( @@ -874,12 +874,12 @@ public class SyncStorageEngine extends Handler { if (authority == null) { return; } - mActiveSync = new ActiveSyncInfo(authority.ident, + mCurrentSync = new SyncInfo(authority.ident, authority.account, authority.authority, activeSyncContext.mStartTime); } else { if (DEBUG) Log.v(TAG, "setActiveSync: null"); - mActiveSync = null; + mCurrentSync = null; } } @@ -1063,9 +1063,9 @@ public class SyncStorageEngine extends Handler { * active sync. Note that the returned object is the real, live active * sync object, so be careful what you do with it. */ - public ActiveSyncInfo getActiveSync() { + public SyncInfo getCurrentSync() { synchronized (mAuthorities) { - return mActiveSync; + return mCurrentSync; } } |