Merge change I52c235db into eclair-mr2

* changes:
  Return valid package info for packages that have been uninstalled with an option to retain data and resources using the flag GET_UNINSTALLED_PACKAGES These packages do not have a package setting. just check the flag and return the required info from PackageParser.generatePackageInfo
This commit is contained in:
Android (Google) Code Review
2009-10-14 19:32:47 -04:00

View File

@@ -872,6 +872,10 @@ class PackageManagerService extends IPackageManager.Stub {
}
PackageInfo generatePackageInfo(PackageParser.Package p, int flags) {
if ((flags & PackageManager.GET_UNINSTALLED_PACKAGES) != 0) {
// The package has been uninstalled but has retained data and resources.
return PackageParser.generatePackageInfo(p, null, flags);
}
final PackageSetting ps = (PackageSetting)p.mExtras;
if (ps == null) {
return null;