Merge "Skip carrier priv check for trusted UIDs" am: df9bf16543

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

Change-Id: I0c47860c86d928bf2868a2724e01c126f11d66a3
This commit is contained in:
Hall Liu
2020-07-23 20:16:01 +00:00
committed by Automerger Merge Worker

View File

@@ -659,6 +659,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(