am 61737d81: am 040d89bb: Merge "Eliminate race condition around backup completion + resumption" into lmp-dev automerge: 11bac0e

automerge: ed1e999

* commit 'ed1e999cb71f3af51ee96a6ed8ac3f3b031e1968':
  Eliminate race condition around backup completion + resumption
This commit is contained in:
Christopher Tate
2014-10-17 01:17:13 +00:00
committed by android-build-merger

View File

@@ -2855,9 +2855,12 @@ public class BackupManagerService extends IBackupManager.Stub {
try { if (mSavedState != null) mSavedState.close(); } catch (IOException e) {}
try { if (mBackupData != null) mBackupData.close(); } catch (IOException e) {}
try { if (mNewState != null) mNewState.close(); } catch (IOException e) {}
mSavedState = mBackupData = mNewState = null;
synchronized (mCurrentOpLock) {
// Current-operation callback handling requires the validity of these various
// bits of internal state as an invariant of the operation still being live.
// This means we make sure to clear all of the state in unison inside the lock.
mCurrentOperations.clear();
mSavedState = mBackupData = mNewState = null;
}
// If this was a pseudopackage there's no associated Activity Manager state