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

Commit eabaa405 authored by Sumedh Sen's avatar Sumedh Sen
Browse files

Check for null while comparing responsible installer & requested installer

If an archived app's installer is uninstalled, there is no "responsible
installer" for that app. While resintalling such an app, treat it like a
normal install instead of an unarchival

Test: Manual. Follow repro steps from the bug
Bug: 364804420
Flag: EXEMPT. Bug fix only
Change-Id: I26085e015531d0e63d2f13cd3d4d4c33c257727f
parent e46f35d7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -856,8 +856,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
                    params.appPackageName, SYSTEM_UID);
            if (ps != null
                    && PackageArchiver.isArchived(ps.getUserStateOrDefault(userId))
                    && PackageArchiver.getResponsibleInstallerPackage(ps)
                            .equals(requestedInstallerPackageName)) {
                    && TextUtils.equals(
                        PackageArchiver.getResponsibleInstallerPackage(ps),
                        requestedInstallerPackageName)) {
                params.installFlags |= PackageManager.INSTALL_UNARCHIVE;
            }
        }