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

Commit 974290b0 authored by Mathew Inwood's avatar Mathew Inwood
Browse files

Don't whitelist all system image apps.

Also include in system dump which packages are exempt from the api
restrictions.

Test: Verified that the device boots.
Bug: 64382372
Change-Id: I01e837253d00c6ffa841a9e5c226204a3e11b827
parent f1070034
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1190,6 +1190,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
            if (category != CATEGORY_UNDEFINED) {
                pw.println(prefix + "category=" + category);
            }
            pw.println("isAllowedToUseHiddenApi=" + isAllowedToUseHiddenApi());
        }
        super.dumpBack(pw, prefix);
    }
@@ -1606,8 +1607,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
    public boolean isAllowedToUseHiddenApi() {
        boolean whitelisted =
                SystemConfig.getInstance().getHiddenApiWhitelistedApps().contains(packageName);
        return isSystemApp() || // TODO get rid of this once the whitelist has been populated
                (whitelisted && (isSystemApp() || isUpdatedSystemApp()));
        return whitelisted && (isSystemApp() || isUpdatedSystemApp());
    }

    /**