Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52c235db authored by Suchi Amalapurapu's avatar Suchi Amalapurapu
Browse files

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
parent 25415e2b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;