PackageManagerService: fix NPE while renaming foreign dex markers.

am: cf70a17a71

Change-Id: I565e13f9b6c74f3cbf0467527920549d2614d10d
This commit is contained in:
Narayan Kamath
2016-06-09 08:34:30 +00:00
committed by android-build-merger

View File

@@ -8619,7 +8619,11 @@ public class PackageManagerService extends IPackageManager.Stub {
// We don't expect installation to fail beyond this point
if (pkgSetting.pkg != null) {
maybeRenameForeignDexMarkers(pkgSetting.pkg, pkg, user);
// Note that |user| might be null during the initial boot scan. If a codePath
// for an app has changed during a boot scan, it's due to an app update that's
// part of the system partition and marker changes must be applied to all users.
maybeRenameForeignDexMarkers(pkgSetting.pkg, pkg,
(user != null) ? user : UserHandle.ALL);
}
// Add the new setting to mSettings