Enforce read privileged phone state on get{Voice/Data}ActivationState
Bug: 67750905
Test: TelephonyManagerTests#test{Voice/Data}ActivationState
Change-Id: I5f6fb9704026fdecdb12b4ac867adf02f0c73f03
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 6e2afc5..50022a5 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -2093,9 +2093,7 @@
*/
@Override
public int getVoiceActivationState(int subId, String callingPackage) {
- if (!canReadPhoneState(callingPackage, "getVoiceActivationStateForSubscriber")) {
- return TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN;
- }
+ enforceReadPrivilegedPermission();
final Phone phone = getPhone(subId);
if (phone != null) {
return phone.getVoiceActivationState();
@@ -2109,9 +2107,7 @@
*/
@Override
public int getDataActivationState(int subId, String callingPackage) {
- if (!canReadPhoneState(callingPackage, "getDataActivationStateForSubscriber")) {
- return TelephonyManager.SIM_ACTIVATION_STATE_UNKNOWN;
- }
+ enforceReadPrivilegedPermission();
final Phone phone = getPhone(subId);
if (phone != null) {
return phone.getDataActivationState();