Loading services/core/java/com/android/server/content/SyncManager.java +20 −9 Original line number Diff line number Diff line Loading @@ -3354,12 +3354,6 @@ public class SyncManager { int downstreamActivity; int upstreamActivity; if (!syncOperation.isPeriodic) { // mSyncJobService.jobFinidhed is async, we need to ensure that this job is // removed from JobScheduler's pending jobs list before moving forward and // potentially rescheduling all pending jobs to respect new backoff values. getJobScheduler().cancel(syncOperation.jobId); } mLogger.log("runSyncFinishedOrCanceledH() op=", syncOperation, " result=", syncResult); if (syncResult != null) { Loading @@ -3368,6 +3362,16 @@ public class SyncManager { + syncOperation + ", result " + syncResult); } // In the non-canceled case, close the active sync context before doing the rest // of the stuff. closeActiveSyncContext(activeSyncContext); // Note this part is probably okay to do before closeActiveSyncContext()... // But moved here to restore OC-dev's behavior. See b/64597061. if (!syncOperation.isPeriodic) { getJobScheduler().cancel(syncOperation.jobId); } if (!syncResult.hasError()) { historyMessage = SyncStorageEngine.MESG_SUCCESS; // TODO: set these correctly when the SyncResult is extended to include it Loading Loading @@ -3404,6 +3408,11 @@ public class SyncManager { if (isLoggable) { Slog.v(TAG, "runSyncFinishedOrCanceled [canceled]: " + syncOperation); } if (!syncOperation.isPeriodic) { getJobScheduler().cancel(syncOperation.jobId); } if (activeSyncContext.mSyncAdapter != null) { try { mLogger.log("Calling cancelSync for runSyncFinishedOrCanceled ", Loading @@ -3418,10 +3427,10 @@ public class SyncManager { historyMessage = SyncStorageEngine.MESG_CANCELED; downstreamActivity = 0; upstreamActivity = 0; } // Close and unbind the service. Don't use activeSyncContext.mSyncAdapter after this. // In the cancel sync case, close it after calling cancelSync(). closeActiveSyncContext(activeSyncContext); } stopSyncEvent(activeSyncContext.mHistoryRowId, syncOperation, historyMessage, upstreamActivity, downstreamActivity, elapsedTime); Loading Loading @@ -3457,6 +3466,8 @@ public class SyncManager { + activeSyncContext.toString()); } mSyncHandler.removeMessages(SyncHandler.MESSAGE_MONITOR_SYNC, activeSyncContext); mLogger.log("closeActiveSyncContext: ", activeSyncContext); } /** Loading Loading
services/core/java/com/android/server/content/SyncManager.java +20 −9 Original line number Diff line number Diff line Loading @@ -3354,12 +3354,6 @@ public class SyncManager { int downstreamActivity; int upstreamActivity; if (!syncOperation.isPeriodic) { // mSyncJobService.jobFinidhed is async, we need to ensure that this job is // removed from JobScheduler's pending jobs list before moving forward and // potentially rescheduling all pending jobs to respect new backoff values. getJobScheduler().cancel(syncOperation.jobId); } mLogger.log("runSyncFinishedOrCanceledH() op=", syncOperation, " result=", syncResult); if (syncResult != null) { Loading @@ -3368,6 +3362,16 @@ public class SyncManager { + syncOperation + ", result " + syncResult); } // In the non-canceled case, close the active sync context before doing the rest // of the stuff. closeActiveSyncContext(activeSyncContext); // Note this part is probably okay to do before closeActiveSyncContext()... // But moved here to restore OC-dev's behavior. See b/64597061. if (!syncOperation.isPeriodic) { getJobScheduler().cancel(syncOperation.jobId); } if (!syncResult.hasError()) { historyMessage = SyncStorageEngine.MESG_SUCCESS; // TODO: set these correctly when the SyncResult is extended to include it Loading Loading @@ -3404,6 +3408,11 @@ public class SyncManager { if (isLoggable) { Slog.v(TAG, "runSyncFinishedOrCanceled [canceled]: " + syncOperation); } if (!syncOperation.isPeriodic) { getJobScheduler().cancel(syncOperation.jobId); } if (activeSyncContext.mSyncAdapter != null) { try { mLogger.log("Calling cancelSync for runSyncFinishedOrCanceled ", Loading @@ -3418,10 +3427,10 @@ public class SyncManager { historyMessage = SyncStorageEngine.MESG_CANCELED; downstreamActivity = 0; upstreamActivity = 0; } // Close and unbind the service. Don't use activeSyncContext.mSyncAdapter after this. // In the cancel sync case, close it after calling cancelSync(). closeActiveSyncContext(activeSyncContext); } stopSyncEvent(activeSyncContext.mHistoryRowId, syncOperation, historyMessage, upstreamActivity, downstreamActivity, elapsedTime); Loading Loading @@ -3457,6 +3466,8 @@ public class SyncManager { + activeSyncContext.toString()); } mSyncHandler.removeMessages(SyncHandler.MESSAGE_MONITOR_SYNC, activeSyncContext); mLogger.log("closeActiveSyncContext: ", activeSyncContext); } /** Loading