From f465db9f1d6da1c94af66b64e0450aba72ee8824 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Wed, 30 Apr 2014 13:33:38 +0100 Subject: Don't adjust ABI if PackageSetting#pkg is null. If means the package hasn't been scanned yet, and we will adjust the ABI during the scan of the last package in the shared user group. NOTE: This needs some more cleaning up, which will be done along with the remaining TODO in this function. (cherry picked from commit 6609990e35b11c38f55f6e632160d4f2ff201ea3) Change-Id: Ibace7849485865054e062d2b979f320bf89ff0f3 --- .../java/com/android/server/pm/PackageManagerService.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'services') diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java index c214c83..b77c94c 100755 --- a/services/java/com/android/server/pm/PackageManagerService.java +++ b/services/java/com/android/server/pm/PackageManagerService.java @@ -5373,12 +5373,13 @@ public class PackageManagerService extends IPackageManager.Stub { for (PackageSetting ps : packagesForUser) { if (ps.requiredCpuAbiString == null) { ps.requiredCpuAbiString = requirer.requiredCpuAbiString; - ps.pkg.applicationInfo.requiredCpuAbi = requirer.requiredCpuAbiString; - - Slog.i(TAG, "Adjusting ABI for : " + ps.pkg.packageName + " to " + ps.requiredCpuAbiString); - if (doDexOpt) { - performDexOptLI(ps.pkg, forceDexOpt, deferDexOpt, true); - mInstaller.rmdex(ps.codePathString, getPreferredInstructionSet()); + if (ps.pkg != null) { + ps.pkg.applicationInfo.requiredCpuAbi = requirer.requiredCpuAbiString; + Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + ps.requiredCpuAbiString); + if (doDexOpt) { + performDexOptLI(ps.pkg, forceDexOpt, deferDexOpt, true); + mInstaller.rmdex(ps.codePathString, getPreferredInstructionSet()); + } } } } -- cgit v1.1