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

Commit 6b86ed84 authored by Songchun Fan's avatar Songchun Fan
Browse files

[RESTRICT AUTOMERGE] Revert "Don't abandon child sessions (1/n)"

Revert submission 16575908-dont_abandon_child_qt_dev

Reason for revert:  Reverting CVE-2021-39624 on qt-dev
Reverted Changes:
I4ede6b7a4:Persist destroyed staged sessions until they are c...
Ib0ba9f378:Don't abandon child sessions (1/n)

Change-Id: I7915e3f0ba6dd8430a9b938a518aeeeb4d6b1805
parent a4945fcf
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -330,13 +330,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
                if (age >= MAX_SESSION_AGE_ON_LOW_STORAGE_MILLIS) {
                    // Aggressively close old sessions because we are running low on storage
                    // Their staging dirs will be removed too
                    PackageInstallerSession root = !session.hasParentSessionId()
                            ? session : mSessions.get(session.getParentSessionId());
                    if (!root.isDestroyed() && 
                            (!root.isStaged() || (root.isStaged() && root.isStagedSessionReady()))) 
                    {
                        root.abandon();
                    }
                    session.abandon();
                } else {
                    // Session is new enough, so it deserves to be kept even on low storage
                    unclaimedStagingDirsOnVolume.remove(session.stageDir);