Merge "Fixed a leaked partial wakelock in AbstractThreadedSyncAdapter."
This commit is contained in:
@@ -160,10 +160,13 @@ public abstract class AbstractThreadedSyncAdapter {
|
|||||||
if (mAutoInitialize
|
if (mAutoInitialize
|
||||||
&& extras != null
|
&& extras != null
|
||||||
&& extras.getBoolean(ContentResolver.SYNC_EXTRAS_INITIALIZE, false)) {
|
&& extras.getBoolean(ContentResolver.SYNC_EXTRAS_INITIALIZE, false)) {
|
||||||
|
try {
|
||||||
if (ContentResolver.getIsSyncable(account, authority) < 0) {
|
if (ContentResolver.getIsSyncable(account, authority) < 0) {
|
||||||
ContentResolver.setIsSyncable(account, authority, 1);
|
ContentResolver.setIsSyncable(account, authority, 1);
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
syncContextClient.onFinished(new SyncResult());
|
syncContextClient.onFinished(new SyncResult());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SyncThread syncThread = new SyncThread(
|
SyncThread syncThread = new SyncThread(
|
||||||
|
|||||||
Reference in New Issue
Block a user