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

Commit 40fc1cde authored by JW Wang's avatar JW Wang
Browse files

Fix #removeChildSessionId (3/n)

Can't remove child from a sealed session.

Bug: 162286562
Test: Will be added in next CLs
Change-Id: I5fe20ede028f0e00e739316dab5c6a24b1546718
parent 35da7641
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3141,6 +3141,8 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
            }

            synchronized (mLock) {
                assertCallerIsOwnerOrRootLocked();
                assertPreparedAndNotSealedLocked("removeChildSessionId");
                final int indexOfSession = mChildSessionIds.indexOfKey(sessionId);
                if (session != null) {
                    session.setParentSessionId(SessionInfo.INVALID_ID);