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

Commit 01f31761 authored by Evan Chen's avatar Evan Chen
Browse files

Update the logging for package allowlist checks.

Test: CTS
Bug: 443058517
Flag: EXEMPT bugfix
Change-Id: I59a5204e7073b64c03f21a1560dca8d38ef079e7
parent f1ebbcd3
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -121,8 +121,14 @@ public final class PackageUtils {
     */
    public static boolean isPackageAllowlisted(Context context,
            PackageManagerInternal packageManagerInternal, @NonNull String packageName) {
        return isPackageAllowlisted(context, packageManagerInternal, packageName,
        boolean isAllowListed = isPackageAllowlisted(context, packageManagerInternal, packageName,
                config_companionDevicePackages, config_companionDeviceCerts);
        if (!isAllowListed) {
            Slog.i(TAG, "Package: " + packageName
                    + " is not allowlisted to bypass association dialog");
        }

        return isAllowListed;
    }

    /**
@@ -130,8 +136,14 @@ public final class PackageUtils {
     */
    public static boolean isPermSyncAutoEnabled(Context context,
            PackageManagerInternal packageManagerInternal, String packageName) {
        return isPackageAllowlisted(context, packageManagerInternal, packageName,
        boolean isAllowListed = isPackageAllowlisted(context, packageManagerInternal, packageName,
                config_companionPermSyncEnabledPackages, config_companionPermSyncEnabledCerts);
        if (!isAllowListed) {
            Slog.i(TAG, "Package: " + packageName
                    + " is not allowlisted to bypass perm sync dialog");
        }

        return isAllowListed;
    }

    private static boolean isPackageAllowlisted(Context context,