summaryrefslogtreecommitdiff
path: root/telephony/common
diff options
context:
space:
mode:
authorHall Liu <hallliu@google.com>2020-07-13 23:46:14 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-13 23:46:14 +0000
commit5169953baf9e04b9840ac761f80d95a783238bf6 (patch)
tree0dfdf7fcb7f60fa8f64985a33ef4e1f2d8ffef5a /telephony/common
parent58ccf46c890d6b396ea0e38465aaa3b66477c1c5 (diff)
parentf1a6972937d72d716d5b75d73daae7e3959fb5e9 (diff)
Merge "Skip carrier priv check for trusted UIDs" into rvc-dev am: f1a6972937
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12141306 Change-Id: Iac6c6a95dc0df15e45e2ef4f25a3b92e162800b0
Diffstat (limited to 'telephony/common')
-rw-r--r--telephony/common/com/android/internal/telephony/TelephonyPermissions.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
index bc987a6282c7..71a1964210b0 100644
--- a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
+++ b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
@@ -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(