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

Commit 2ddce8af authored by JW Wang's avatar JW Wang
Browse files

Protect accesses to mStagedSessionXXX (9/n)

Bug: 159663586
Test: atest StagedInstallTest AtomicInstallTest
Change-Id: I6c91d7f5b39ed3aa1627f82ba1d4317a24c2debd
parent 631f6a1b
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -3129,28 +3129,38 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {

    /** {@hide} */
    boolean isStagedSessionReady() {
        synchronized (mLock) {
            return mStagedSessionReady;
        }
    }

    /** {@hide} */
    boolean isStagedSessionApplied() {
        synchronized (mLock) {
            return mStagedSessionApplied;
        }
    }

    /** {@hide} */
    boolean isStagedSessionFailed() {
        synchronized (mLock) {
            return mStagedSessionFailed;
        }
    }

    /** {@hide} */
    @StagedSessionErrorCode int getStagedSessionErrorCode() {
        synchronized (mLock) {
            return mStagedSessionErrorCode;
        }
    }

    /** {@hide} */
    String getStagedSessionErrorMessage() {
        synchronized (mLock) {
            return mStagedSessionErrorMessage;
        }
    }

    private void destroyInternal() {
        synchronized (mLock) {