diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2013-07-30 15:32:19 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-07-30 15:32:19 -0700 |
commit | 46aae98b41fe6e6b61aeddff3ad3f41bc4ceace3 (patch) | |
tree | 59bedf6717fe92ac81a786bf850e825a2df480d3 /core/java/android | |
parent | c40e46e8413c112186eadc8526d20306d81c9008 (diff) | |
parent | f2d643cfc7405c1f771cacab365a0a5d9b547f36 (diff) | |
download | frameworks_base-46aae98b41fe6e6b61aeddff3ad3f41bc4ceace3.zip frameworks_base-46aae98b41fe6e6b61aeddff3ad3f41bc4ceace3.tar.gz frameworks_base-46aae98b41fe6e6b61aeddff3ad3f41bc4ceace3.tar.bz2 |
am f2d643cf: Merge "Fixed a leaked partial wakelock in AbstractThreadedSyncAdapter."
* commit 'f2d643cfc7405c1f771cacab365a0a5d9b547f36':
Fixed a leaked partial wakelock in AbstractThreadedSyncAdapter.
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/content/AbstractThreadedSyncAdapter.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/content/AbstractThreadedSyncAdapter.java b/core/java/android/content/AbstractThreadedSyncAdapter.java index bafe67d..898cc4e 100644 --- a/core/java/android/content/AbstractThreadedSyncAdapter.java +++ b/core/java/android/content/AbstractThreadedSyncAdapter.java @@ -160,10 +160,13 @@ public abstract class AbstractThreadedSyncAdapter { if (mAutoInitialize && extras != null && extras.getBoolean(ContentResolver.SYNC_EXTRAS_INITIALIZE, false)) { - if (ContentResolver.getIsSyncable(account, authority) < 0) { - ContentResolver.setIsSyncable(account, authority, 1); + try { + if (ContentResolver.getIsSyncable(account, authority) < 0) { + ContentResolver.setIsSyncable(account, authority, 1); + } + } finally { + syncContextClient.onFinished(new SyncResult()); } - syncContextClient.onFinished(new SyncResult()); return; } SyncThread syncThread = new SyncThread( |