[RESTRICT AUTOMERGE] Revert "Fix NPE"

This reverts commit f562aadd77.

Reason for revert: Reverting CVE-2021-39624 on qt-dev

Change-Id: Ida84f497eb188b4923acbe8acdbe4d47427aa24e
This commit is contained in:
Songchun Fan
2022-06-28 01:06:53 +00:00
parent f562aadd77
commit a4945fcf4b

View File

@@ -332,10 +332,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
// Their staging dirs will be removed too
PackageInstallerSession root = !session.hasParentSessionId()
? session : mSessions.get(session.getParentSessionId());
if (root == null) {
Slog.e(TAG, "freeStageDirs: found an orphaned session: "
+ session.sessionId + " parent=" + session.getParentSessionId());
} else if (!root.isDestroyed() &&
if (!root.isDestroyed() &&
(!root.isStaged() || (root.isStaged() && root.isStagedSessionReady())))
{
root.abandon();