Merge "Revert "Prevent committing session while in progress"" into tm-qpr-dev am: aac6f0ff36
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20500128 Change-Id: I2e5eaf8a662f48c7a4195646bd2b3dd68faabde5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -366,14 +366,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
@GuardedBy("mLock")
|
||||
private boolean mStageDirInUse = false;
|
||||
|
||||
/**
|
||||
* True if the installation is already in progress. This is used to prevent the caller
|
||||
* from {@link #commit(IntentSender, boolean) committing} the session again while the
|
||||
* installation is still in progress.
|
||||
*/
|
||||
@GuardedBy("mLock")
|
||||
private boolean mInstallationInProgress = false;
|
||||
|
||||
/** Permissions have been accepted by the user (see {@link #setPermissionsResult}) */
|
||||
@GuardedBy("mLock")
|
||||
private boolean mPermissionsManuallyAccepted = false;
|
||||
@@ -1669,14 +1661,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
synchronized (mLock) {
|
||||
if (mInstallationInProgress) {
|
||||
throw new IllegalStateException("Installation is already in progress. Don't "
|
||||
+ "commit session=" + sessionId + " again.");
|
||||
}
|
||||
mInstallationInProgress = true;
|
||||
}
|
||||
|
||||
dispatchSessionSealed();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user