Merge "Use removePackageLI instead of removing mPackages" into jb-dev

This commit is contained in:
Kenny Root
2012-06-26 10:34:44 -07:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 2 deletions

View File

@ -1087,7 +1087,8 @@ public class PackageManagerService extends IPackageManager.Stub {
/*
* If the package is scanned, it's not erased.
*/
if (mPackages.containsKey(ps.name)) {
final PackageParser.Package scannedPkg = mPackages.get(ps.name);
if (scannedPkg != null) {
/*
* If the system app is both scanned and in the
* disabled packages list, then it must have been
@ -1096,7 +1097,9 @@ public class PackageManagerService extends IPackageManager.Stub {
* application can be scanned.
*/
if (mSettings.isDisabledSystemPackageLPr(ps.name)) {
mPackages.remove(ps.name);
Slog.i(TAG, "Expecting better updatd system app for " + ps.name
+ "; removing system app");
removePackageLI(scannedPkg, true);
}
continue;
@ -8626,6 +8629,10 @@ public class PackageManagerService extends IPackageManager.Stub {
}
pw.print(" ["); pw.print(entry.getKey()); pw.println("]:");
pw.print(" "); pw.println(p.toString());
if (p.info != null && p.info.applicationInfo != null) {
final String appInfo = p.info.applicationInfo.toString();
pw.print(" applicationInfo="); pw.println(appInfo);
}
}
}

View File

@ -2459,6 +2459,7 @@ final class Settings {
pw.print(" nativeLibraryPath="); pw.println(ps.nativeLibraryPathString);
pw.print(" versionCode="); pw.println(ps.versionCode);
if (ps.pkg != null) {
pw.print(" applicationInfo="); pw.println(ps.pkg.applicationInfo.toString());
pw.print(" flags="); printFlags(pw, ps.pkg.applicationInfo.flags, FLAG_DUMP_SPEC); pw.println();
pw.print(" versionName="); pw.println(ps.pkg.mVersionName);
pw.print(" dataDir="); pw.println(ps.pkg.applicationInfo.dataDir);
@ -2592,6 +2593,10 @@ final class Settings {
pw.print(" compat name=");
pw.println(ps.name);
}
if (ps.pkg != null && ps.pkg.applicationInfo != null) {
pw.print(" applicationInfo=");
pw.println(ps.pkg.applicationInfo.toString());
}
pw.print(" userId=");
pw.println(ps.appId);
pw.print(" sharedUser=");