Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 589c4f7a authored by Chun-Wei Wang's avatar Chun-Wei Wang Committed by Android (Google) Code Review
Browse files

Revert "Prevent committing session while in progress"

This reverts commit 11380642.

Reason for revert: b/259333954

Change-Id: I724ec379395237ff8f47c98815d0ea49b7417e5d
parent 11380642
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -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();
    }