diff options
author | narayan <narayan@google.com> | 2014-05-21 20:17:52 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-21 20:17:52 +0000 |
commit | ab3d85ab1a0ae58add5df6efc30607624475405b (patch) | |
tree | 1e9ac6428529c77866b9a584298f820395104672 /services/java | |
parent | 9ef2117f0e65db60cb3f9708174bcaca4db813b2 (diff) | |
parent | 838b1e2215cbc27e77530f4c79124c088353e0e7 (diff) | |
download | frameworks_base-ab3d85ab1a0ae58add5df6efc30607624475405b.zip frameworks_base-ab3d85ab1a0ae58add5df6efc30607624475405b.tar.gz frameworks_base-ab3d85ab1a0ae58add5df6efc30607624475405b.tar.bz2 |
am 838b1e22: Merge "Fix NPE in PackageManagerService."
* commit '838b1e2215cbc27e77530f4c79124c088353e0e7':
Fix NPE in PackageManagerService.
Diffstat (limited to 'services/java')
-rwxr-xr-x | services/java/com/android/server/pm/PackageManagerService.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java index 5b3bbf9..309378a 100755 --- a/services/java/com/android/server/pm/PackageManagerService.java +++ b/services/java/com/android/server/pm/PackageManagerService.java @@ -5683,21 +5683,23 @@ public class PackageManagerService extends IPackageManager.Stub { } for (PackageSetting ps : packagesForUser) { - if (scannedPackage == null || ! scannedPackage.packageName.equals(ps.name)) { + if (scannedPackage == null || !scannedPackage.packageName.equals(ps.name)) { if (ps.cpuAbiString != null) { continue; } ps.cpuAbiString = adjustedAbi; - ps.pkg.applicationInfo.cpuAbi = adjustedAbi; - Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + adjustedAbi); - - if (performDexOptLI(ps.pkg, forceDexOpt, deferDexOpt, true) == DEX_OPT_FAILED) { - ps.cpuAbiString = null; - ps.pkg.applicationInfo.cpuAbi = null; - return false; - } else { - mInstaller.rmdex(ps.codePathString, getPreferredInstructionSet()); + if (ps.pkg != null && ps.pkg.applicationInfo != null) { + ps.pkg.applicationInfo.cpuAbi = adjustedAbi; + Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + adjustedAbi); + + if (performDexOptLI(ps.pkg, forceDexOpt, deferDexOpt, true) == DEX_OPT_FAILED) { + ps.cpuAbiString = null; + ps.pkg.applicationInfo.cpuAbi = null; + return false; + } else { + mInstaller.rmdex(ps.codePathString, getPreferredInstructionSet()); + } } } } |