BackupManagerService#cancelBackups() releases mCurrentOpLock sooner

Incoming operations don't have to block until all backup ops to be
cancelled are handled.

Test: make gts -j40 && gts-tradefed run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.backup.BackupManagerHostTest
Bug: 35767318
Change-Id: I1c6f7a1cfbfc18483311044a75e46cd4e8f9f4f3
This commit is contained in:
Michal Karpinski
2017-03-06 13:39:19 +00:00
parent e1be1dfbc3
commit eb4ab301e1

View File

@@ -2462,12 +2462,10 @@ public class BackupManagerService {
operationsToCancel.add(token);
}
}
for (Integer token : operationsToCancel) {
handleCancel(token, true /* cancelAll */);
}
}
for (Integer token : operationsToCancel) {
handleCancel(token, true /* cancelAll */);
}
// We don't want the backup jobs to kick in any time soon.
// Reschedules them to run in the distant future.
KeyValueBackupJob.schedule(mContext, BUSY_BACKOFF_MIN_MILLIS);