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

Commit 658b1387 authored by Winson's avatar Winson
Browse files

Pass uninstalled PackageSetting to InstantAppRegistry instead of querying

It won't exist because the package has already been uninstalled, so
it needs to be given the removed PackageSetting.

Broken during AndroidPackage refactor.

Bug: 146451796

Test: atest InstantCookieHostTest

Change-Id: Ic027ecc3d0a58dbe500a4f85b52a5840cd9fb51b
parent 45328cdf
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -338,9 +338,8 @@ class InstantAppRegistry {
    }

    @GuardedBy("mService.mLock")
    public void onPackageUninstalledLPw(@NonNull AndroidPackage pkg,
    public void onPackageUninstalledLPw(@NonNull AndroidPackage pkg, @Nullable PackageSetting ps,
            @NonNull int[] userIds) {
        PackageSetting ps = mService.getPackageSetting(pkg.getPackageName());
        if (ps == null) {
            return;
        }
+2 −1
Original line number Diff line number Diff line
@@ -17446,7 +17446,8 @@ public class PackageManagerService extends IPackageManager.Stub
            synchronized (mLock) {
                if (res) {
                    if (pkg != null) {
                        mInstantAppRegistry.onPackageUninstalledLPw(pkg, info.removedUsers);
                        mInstantAppRegistry.onPackageUninstalledLPw(pkg, uninstalledPs,
                                info.removedUsers);
                    }
                    updateSequenceNumberLP(uninstalledPs, info.removedUsers);
                    updateInstantAppInstallerLocked(packageName);