diff options
Diffstat (limited to 'telephony/java/android')
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index a7350c9..b96f528 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -29,6 +29,7 @@ import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; +import android.telecom.PhoneAccount; import android.util.Log; import com.android.internal.telecom.ITelecomService; @@ -3779,7 +3780,7 @@ public class TelephonyManager { /** * Returns the IMS Registration Status - *@hide + * @hide */ public boolean isImsRegistered() { try { @@ -4130,4 +4131,21 @@ public class TelephonyManager { ServiceState.rilRadioTechnologyToString(type)); } } + + /** + * Returns the subscription ID for the given phone account. + * @hide + */ + public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) { + int retval = SubscriptionManager.INVALID_SUBSCRIPTION_ID; + try { + ITelephony service = getITelephony(); + if (service != null) { + retval = service.getSubIdForPhoneAccount(phoneAccount); + } + } catch (RemoteException e) { + } + + return retval; + } } |
