Add OrSelf to privileged permission check.
Bug: 22857263
Change-Id: Ide7105dfd653e3c271330822fb8cee7cf620e35d
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index ebe930b..5c498c0 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -1124,8 +1124,9 @@
}
try {
- mContext.enforceCallingPermission(READ_PRIVILEGED_PHONE_STATE, message);
- // SKIP checking run-time OP_READ_PHONE_STATE since using PRIVILEGED
+ mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE, message);
+ // SKIP checking run-time OP_READ_PHONE_STATE since caller or self has PRIVILEGED
+ // permission
return true;
} catch (SecurityException e) {
// Accessing phone state is gated by a special permission.