summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authornarayan <narayan@google.com>2014-05-21 20:17:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-21 20:17:52 +0000
commitab3d85ab1a0ae58add5df6efc30607624475405b (patch)
tree1e9ac6428529c77866b9a584298f820395104672 /services/java
parent9ef2117f0e65db60cb3f9708174bcaca4db813b2 (diff)
parent838b1e2215cbc27e77530f4c79124c088353e0e7 (diff)
downloadframeworks_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-xservices/java/com/android/server/pm/PackageManagerService.java22
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());
+ }
}
}
}