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

Commit e7945bef authored by Satoshi Niwa's avatar Satoshi Niwa
Browse files

Fix an NPE in PackageManagerService (introduced by ag/3819668)

Since PackageParser.generateApplicationInfo may return null, we need a null check after it.

Bug: 73134482
Bug: 78678911
Test: manually tested on ARC/ChromeOS and confirmed NPE had gone away
Change-Id: I7f91b2cbe29ab7c20758f97501c49e1401ee1e7e
parent f0e74ae8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -22447,9 +22447,13 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
        }
        final String volumeUuid = pkg.volumeUuid;
        final String packageName = pkg.packageName;
        final ApplicationInfo app = (ps == null)
        ApplicationInfo app = (ps == null)
                ? pkg.applicationInfo
                : PackageParser.generateApplicationInfo(pkg, 0, ps.readUserState(userId), userId);
        if (app == null) {
            app = pkg.applicationInfo;
        }
        final int appId = UserHandle.getAppId(app.uid);