Merge "Eliminate a race condition that could lead to calling PBT#finalizeBackup() twice" into oc-dr1-dev
am: 150fec445a
Change-Id: I703b8b4cbcf810615946e7ef5bd4c6690ded8674
This commit is contained in:
@@ -2822,11 +2822,11 @@ public class BackupManagerService implements BackupManagerServiceInterface {
|
||||
break;
|
||||
|
||||
case FINAL:
|
||||
if (!mFinished) finalizeBackup();
|
||||
else {
|
||||
Slog.e(TAG, "Duplicate finish");
|
||||
if (!mFinished) {
|
||||
finalizeBackup();
|
||||
} else {
|
||||
Slog.e(TAG, "Duplicate finish of K/V pass");
|
||||
}
|
||||
mFinished = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3180,6 +3180,7 @@ public class BackupManagerService implements BackupManagerServiceInterface {
|
||||
break;
|
||||
}
|
||||
}
|
||||
mFinished = true;
|
||||
Slog.i(BackupManagerService.TAG, "K/V backup pass finished.");
|
||||
// Only once we're entirely finished do we release the wakelock for k/v backup.
|
||||
mWakelock.release();
|
||||
|
||||
Reference in New Issue
Block a user