am 838b1e22: Merge "Fix NPE in PackageManagerService."

* commit '838b1e2215cbc27e77530f4c79124c088353e0e7':
  Fix NPE in PackageManagerService.
This commit is contained in:
narayan
2014-05-21 20:17:52 +00:00
committed by Android Git Automerger

View File

@ -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 (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());
}
}
}
}