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:
@@ -872,6 +872,10 @@ class PackageManagerService extends IPackageManager.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PackageInfo generatePackageInfo(PackageParser.Package p, int flags) {
|
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;
|
final PackageSetting ps = (PackageSetting)p.mExtras;
|
||||||
if (ps == null) {
|
if (ps == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user