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

Commit 804563c1 authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by android-build-merger
Browse files

Prevent closing by prev owner after transfer.

am: 3306c0d7

Change-Id: I8c033bbfda3177467878b6a456a790237730634d
parents ccf0225c 3306c0d7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1388,11 +1388,13 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {

    @Override
    public void close() {
        int activeCount;
        synchronized (mLock) {
            assertCallerIsOwnerOrRootLocked();
            activeCount = mActiveCount.decrementAndGet();
        }

        if (mActiveCount.decrementAndGet() == 0) {
        if (activeCount == 0) {
            mCallback.onSessionActiveChanged(this, false);
        }
    }