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

Commit 4575d900 authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Don't crash the system if there is broken precondition.

Bug: 257403361
Fixes: 257403361
Test: presubmit
Change-Id: Iabd2833fd590c8c5d49aeb6f8c0b538c0e2508c6
parent 18493369
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3711,7 +3711,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
    private boolean dispatchPendingAbandonCallback() {
        final Runnable callback;
        synchronized (mLock) {
            Preconditions.checkState(mStageDirInUse);
            if (!mStageDirInUse) {
                return false;
            }
            mStageDirInUse = false;
            callback = mPendingAbandonCallback;
            mPendingAbandonCallback = null;