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

Commit 44021f46 authored by Hall Liu's avatar Hall Liu Committed by Automerger Merge Worker
Browse files

Merge "Skip carrier priv check for trusted UIDs" into rvc-dev am: f1a69729...

Merge "Skip carrier priv check for trusted UIDs" into rvc-dev am: f1a69729 am: a9d9ea8a am: ccc8daf8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12141306

Change-Id: I3a93a98eff17d98c82cc2f30dc75880c36e3d56e
parents 0d23b0b6 ccc8daf8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8178,7 +8178,7 @@ public abstract class PackageManager {
    private static final PropertyInvalidatedCache<PackageInfoQuery, PackageInfo>
            sPackageInfoCache =
            new PropertyInvalidatedCache<PackageInfoQuery, PackageInfo>(
                    16, PermissionManager.CACHE_KEY_PACKAGE_INFO) {
                    32, PermissionManager.CACHE_KEY_PACKAGE_INFO) {
                @Override
                protected PackageInfo recompute(PackageInfoQuery query) {
                    return getPackageInfoAsUserUncached(
+4 −0
Original line number Diff line number Diff line
@@ -623,6 +623,10 @@ public final class TelephonyPermissions {
    }

    private static int getCarrierPrivilegeStatus(Context context, int subId, int uid) {
        if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
            // Skip the check if it's one of these special uids
            return TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
        }
        final long identity = Binder.clearCallingIdentity();
        try {
            TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(