Create new API for MNO carrier id
New telephony APIs to getSimMnoCarrierId
Bug: 115709816
Test: Build pass
Change-Id: Ic702343782ed95820d893e56d13202563c90c7fd
Merged-in: Ic702343782ed95820d893e56d13202563c90c7fd
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index c44f7db..6ce8784 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -54,7 +54,6 @@
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
-import android.telephony.emergency.EmergencyNumber;
import android.telephony.CarrierConfigManager;
import android.telephony.CellInfo;
import android.telephony.CellInfoGsm;
@@ -79,6 +78,7 @@
import android.telephony.UssdResponse;
import android.telephony.VisualVoicemailSmsFilterSettings;
import android.telephony.cdma.CdmaCellLocation;
+import android.telephony.emergency.EmergencyNumber;
import android.telephony.gsm.GsmCellLocation;
import android.telephony.ims.aidl.IImsCapabilityCallback;
import android.telephony.ims.aidl.IImsConfig;
@@ -2058,6 +2058,17 @@
}
}
+ @Override
+ public int getSubscriptionMNOCarrierId(int subId) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ final Phone phone = getPhone(subId);
+ return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getMNOCarrierId();
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
//
// Internal helper methods.
//