Loading src/com/android/server/telecom/TelecomServiceImpl.java +12 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.telecom; import static android.Manifest.permission.CALL_PHONE; import static android.Manifest.permission.MODIFY_PHONE_STATE; import static android.Manifest.permission.READ_PHONE_STATE; import static android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE; import static android.Manifest.permission.REGISTER_SIM_SUBSCRIPTION; import static android.Manifest.permission.WRITE_SECURE_SETTINGS; Loading Loading @@ -1110,6 +1111,11 @@ public class TelecomServiceImpl { return true; } try { mContext.enforceCallingPermission(READ_PHONE_STATE, message); // SKIP checking run-time OP_READ_PHONE_STATE since using PRIVILEGED return true; } catch (SecurityException e) { // Accessing phone state is gated by a special permission. mContext.enforceCallingOrSelfPermission(READ_PHONE_STATE, message); Loading @@ -1117,6 +1123,7 @@ public class TelecomServiceImpl { return mAppOpsManager.noteOp(AppOpsManager.OP_READ_PHONE_STATE, Binder.getCallingUid(), callingPackage) == AppOpsManager.MODE_ALLOWED; } } private boolean canCallPhone(String callingPackage, String message) { // The system/default dialer can always read phone state - so that emergency calls will Loading Loading
src/com/android/server/telecom/TelecomServiceImpl.java +12 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.telecom; import static android.Manifest.permission.CALL_PHONE; import static android.Manifest.permission.MODIFY_PHONE_STATE; import static android.Manifest.permission.READ_PHONE_STATE; import static android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE; import static android.Manifest.permission.REGISTER_SIM_SUBSCRIPTION; import static android.Manifest.permission.WRITE_SECURE_SETTINGS; Loading Loading @@ -1110,6 +1111,11 @@ public class TelecomServiceImpl { return true; } try { mContext.enforceCallingPermission(READ_PHONE_STATE, message); // SKIP checking run-time OP_READ_PHONE_STATE since using PRIVILEGED return true; } catch (SecurityException e) { // Accessing phone state is gated by a special permission. mContext.enforceCallingOrSelfPermission(READ_PHONE_STATE, message); Loading @@ -1117,6 +1123,7 @@ public class TelecomServiceImpl { return mAppOpsManager.noteOp(AppOpsManager.OP_READ_PHONE_STATE, Binder.getCallingUid(), callingPackage) == AppOpsManager.MODE_ALLOWED; } } private boolean canCallPhone(String callingPackage, String message) { // The system/default dialer can always read phone state - so that emergency calls will Loading