Implementation for getPhoneAccountHandleForSubscriptionId method.
Test: Manual
Bug: 128916238
Change-Id: If3e6a217168d8e49128d41a74ea316d774e5ec02
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index ca93961..d14939b 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;
@@ -5301,6 +5302,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.
*/