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

Commit 8b12d853 authored by Chun-Wei Wang's avatar Chun-Wei Wang Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE" into tm-dev

parents 86aff453 07e31dfb
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -410,7 +410,10 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
                    // Their staging dirs will be removed too
                    // Their staging dirs will be removed too
                    PackageInstallerSession root = !session.hasParentSessionId()
                    PackageInstallerSession root = !session.hasParentSessionId()
                            ? session : mSessions.get(session.getParentSessionId());
                            ? session : mSessions.get(session.getParentSessionId());
                    if (!root.isDestroyed()) {
                    if (root == null) {
                        Slog.e(TAG, "freeStageDirs: found an orphaned session: "
                                + session.sessionId + " parent=" + session.getParentSessionId());
                    } else if (!root.isDestroyed()) {
                        root.abandon();
                        root.abandon();
                    }
                    }
                } else {
                } else {