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

Commit 7287feb1 authored by JW Wang's avatar JW Wang
Browse files

Always install APEX packages

* APEX packages should always be installed and need no
explicit allowlist.

* Don't report errors when APEX is not on allowlist.

Bug: 225756739
Fix: 225756739
Test: atest AndroidCarApiTest
      adb shell cmd user report-system-user-package-whitelist-problems \
      --critical-only --mode 1
      check no errors are reported
Change-Id: Ibfc3c7f4ddb67882005b10af676949b79f034be8
parent 0182fb2d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ class UserSystemPackageInstaller {
        final String logMessageFmt = "System package %s is not whitelisted using "
                + "'install-in-user-type' in SystemConfig for any user types!";
        pmInt.forEachPackage(pkg -> {
            if (!pkg.isSystem()) return;
            if (!pkg.isSystem() || pkg.isApex()) return;
            final String pkgName = pkg.getManifestPackageName();
            if (!allWhitelistedPackages.contains(pkgName)
                    && !shouldUseOverlayTargetName(pmInt.getPackage(pkgName))) {
@@ -574,7 +574,8 @@ class UserSystemPackageInstaller {
        final String pkgName = shouldUseOverlayTargetName(sysPkg) ?
                sysPkg.getOverlayTarget() : sysPkg.getManifestPackageName();
        return (implicitlyWhitelist && !userTypeWhitelist.containsKey(pkgName))
                || userWhitelist.contains(pkgName);
                || userWhitelist.contains(pkgName)
                || sysPkg.isApex();
    }

    /**