Loading core/java/android/content/SyncManager.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -1696,16 +1696,17 @@ public class SyncManager implements OnAccountsUpdateListener { Log.v(TAG, "runStateIdle: setting mActiveSyncContext to " + mActiveSyncContext); Log.v(TAG, "runStateIdle: setting mActiveSyncContext to " + mActiveSyncContext); } } mSyncStorageEngine.setActiveSync(mActiveSyncContext); mSyncStorageEngine.setActiveSync(mActiveSyncContext); mSyncWakeLock.setWorkSource(new WorkSource(syncAdapterInfo.uid)); if (!activeSyncContext.bindToSyncAdapter(syncAdapterInfo)) { if (!activeSyncContext.bindToSyncAdapter(syncAdapterInfo)) { Log.e(TAG, "Bind attempt failed to " + syncAdapterInfo); Log.e(TAG, "Bind attempt failed to " + syncAdapterInfo); mActiveSyncContext.close(); mActiveSyncContext.close(); mActiveSyncContext = null; mActiveSyncContext = null; mSyncStorageEngine.setActiveSync(mActiveSyncContext); mSyncStorageEngine.setActiveSync(mActiveSyncContext); mSyncWakeLock.setWorkSource(null); runStateIdle(); runStateIdle(); return; return; } } mSyncWakeLock.setWorkSource(new WorkSource(syncAdapterInfo.uid)); mSyncWakeLock.acquire(); mSyncWakeLock.acquire(); // no need to schedule an alarm, as that will be done by our caller. // no need to schedule an alarm, as that will be done by our caller. Loading Loading
core/java/android/content/SyncManager.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -1696,16 +1696,17 @@ public class SyncManager implements OnAccountsUpdateListener { Log.v(TAG, "runStateIdle: setting mActiveSyncContext to " + mActiveSyncContext); Log.v(TAG, "runStateIdle: setting mActiveSyncContext to " + mActiveSyncContext); } } mSyncStorageEngine.setActiveSync(mActiveSyncContext); mSyncStorageEngine.setActiveSync(mActiveSyncContext); mSyncWakeLock.setWorkSource(new WorkSource(syncAdapterInfo.uid)); if (!activeSyncContext.bindToSyncAdapter(syncAdapterInfo)) { if (!activeSyncContext.bindToSyncAdapter(syncAdapterInfo)) { Log.e(TAG, "Bind attempt failed to " + syncAdapterInfo); Log.e(TAG, "Bind attempt failed to " + syncAdapterInfo); mActiveSyncContext.close(); mActiveSyncContext.close(); mActiveSyncContext = null; mActiveSyncContext = null; mSyncStorageEngine.setActiveSync(mActiveSyncContext); mSyncStorageEngine.setActiveSync(mActiveSyncContext); mSyncWakeLock.setWorkSource(null); runStateIdle(); runStateIdle(); return; return; } } mSyncWakeLock.setWorkSource(new WorkSource(syncAdapterInfo.uid)); mSyncWakeLock.acquire(); mSyncWakeLock.acquire(); // no need to schedule an alarm, as that will be done by our caller. // no need to schedule an alarm, as that will be done by our caller. Loading