Merge "Implementation for getPhoneAccountHandleForSubscriptionId method." am: 46329f27de
am: d1dec575e8
Change-Id: Ic2b9c6185b8b3b087e0a9277a5a59a63cba8b982
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 4423921..f7d0979 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -21,6 +21,7 @@
import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
import android.Manifest.permission;
+import android.annotation.Nullable;
import android.app.AppOpsManager;
import android.app.PendingIntent;
import android.content.ComponentName;
@@ -5298,6 +5299,20 @@
}
}
+ @Override
+ public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ Phone phone = getPhone(subscriptionId);
+ if (phone == null) {
+ return null;
+ }
+ return PhoneUtils.makePstnPhoneAccountHandle(phone);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
/**
* @return the VoWiFi calling availability.
*/