Add isManualNetworkSelectionAllowed api
Bug: 111453847
Test: build
Merged-In: I01c66d0fafb1fd0a50a66c8a3d3a66cf509494c9
Change-Id: I01c66d0fafb1fd0a50a66c8a3d3a66cf509494c9
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index cef0e53..8866d30 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -4980,6 +4980,23 @@
}
@Override
+ public boolean isManualNetworkSelectionAllowed(int subId) {
+ boolean isAllowed = true;
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
+ mApp, subId, "isManualNetworkSelectionAllowed");
+ Phone phone = getPhone(subId);
+ if (phone != null) {
+ isAllowed = phone.isCspPlmnEnabled();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ return isAllowed;
+ }
+
+ @Override
public UiccSlotInfo[] getUiccSlotsInfo() {
enforceReadPrivilegedPermission();