Merge "Do not commit session twice"

This commit is contained in:
TreeHugger Robot
2018-07-10 20:55:05 +00:00
committed by Android (Google) Code Review

View File

@@ -930,6 +930,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
@GuardedBy("mLock")
private void commitLocked()
throws PackageManagerException {
if (mRelinquished) {
Slog.d(TAG, "Ignoring commit after previous commit relinquished control");
return;
}
if (mDestroyed) {
throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, "Session destroyed");
}