summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java21
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl5
2 files changed, 26 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index f5ae945e5174..1a820a63d7fa 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -8841,6 +8841,27 @@ public class TelephonyManager {
return retval;
}
+ /**
+ * Determines the {@link PhoneAccountHandle} associated with a subscription Id.
+ *
+ * @param subscriptionId The subscription Id to check.
+ * @return The {@link PhoneAccountHandle} associated with a subscription Id, or {@code null} if
+ * there is no associated {@link PhoneAccountHandle}.
+ * @hide
+ */
+ public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
+ PhoneAccountHandle returnValue = null;
+ try {
+ ITelephony service = getITelephony();
+ if (service != null) {
+ returnValue = service.getPhoneAccountHandleForSubscriptionId(subscriptionId);
+ }
+ } catch (RemoteException e) {
+ }
+
+ return returnValue;
+ }
+
private int getSubIdForPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) {
int retval = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
try {
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index c8dab272de3e..26d0c82b2d00 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1265,6 +1265,11 @@ interface ITelephony {
*/
int getSubIdForPhoneAccount(in PhoneAccount phoneAccount);
+ /**
+ * Returns the PhoneAccountHandle associated with a subscription ID.
+ */
+ PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId);
+
void factoryReset(int subId);
/**