am 82ec8c58: am ab3d85ab: am 838b1e22: Merge "Fix NPE in PackageManagerService."

* commit '82ec8c58b1f1cd0cce56d11b7679440f6ba54f4a':
  Fix NPE in PackageManagerService.
This commit is contained in:
narayan
2014-05-21 20:49:09 +00:00
committed by The Android Automerger
parent 89ea3cd049
commit 34a3249b76

View File

@@ -6039,21 +6039,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 (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());
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());
}
}
}
}