Loading services/core/java/com/android/server/pm/PackageManagerService.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -1915,9 +1915,13 @@ public class PackageManagerService extends IPackageManager.Stub { // survive long enough to benefit of background optimizations. // survive long enough to benefit of background optimizations. for (int userId : firstUsers) { for (int userId : firstUsers) { PackageInfo info = getPackageInfo(packageName, /*flags*/ 0, userId); PackageInfo info = getPackageInfo(packageName, /*flags*/ 0, userId); // There's a race currently where some install events may interleave with an uninstall. // This can lead to package info being null (b/36642664). if (info != null) { mDexManager.notifyPackageInstalled(info, userId); mDexManager.notifyPackageInstalled(info, userId); } } } } } // If someone is watching installs - notify them // If someone is watching installs - notify them if (installObserver != null) { if (installObserver != null) { Loading
services/core/java/com/android/server/pm/PackageManagerService.java +5 −1 Original line number Original line Diff line number Diff line Loading @@ -1915,9 +1915,13 @@ public class PackageManagerService extends IPackageManager.Stub { // survive long enough to benefit of background optimizations. // survive long enough to benefit of background optimizations. for (int userId : firstUsers) { for (int userId : firstUsers) { PackageInfo info = getPackageInfo(packageName, /*flags*/ 0, userId); PackageInfo info = getPackageInfo(packageName, /*flags*/ 0, userId); // There's a race currently where some install events may interleave with an uninstall. // This can lead to package info being null (b/36642664). if (info != null) { mDexManager.notifyPackageInstalled(info, userId); mDexManager.notifyPackageInstalled(info, userId); } } } } } // If someone is watching installs - notify them // If someone is watching installs - notify them if (installObserver != null) { if (installObserver != null) {