Make isDataEnabledForApn() a system api.
Test: atest TelephonyManagerTest#testIsDataEnabledForApn
Bug: 140763963
Change-Id: I816972df567dd210822edc30f9434a39c7815e46
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index a847d66..09b673b 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -7222,10 +7222,8 @@
*/
@Override
public boolean isDataEnabledForApn(int apnType, int subId, String callingPackage) {
- if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
- mApp, subId, callingPackage, "isDataEnabledForApn")) {
- throw new SecurityException("Needs READ_PHONE_STATE for isDataEnabledForApn");
- }
+ enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
+ + "isDataEnabledForApn");
// Now that all security checks passes, perform the operation as ourselves.
final long identity = Binder.clearCallingIdentity();