Add subscription specific API for IMS registration status
Add a new API "isImsRegisteredForSubscriber(int subId)" so that IMS
registration status for specific subscription is acquired.
Bug: 28806101
Test: Manually Enable/Disable IMS and view Settings
Merged-In: I6c452c512f03cf41704b91331e44141ed3050cf9
Change-Id: I6c452c512f03cf41704b91331e44141ed3050cf9
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index c06e34e..7493858 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3276,6 +3276,21 @@
return mPhone.isImsRegistered();
}
+ /**
+ * {@hide}
+ * Returns the IMS Registration Status on a particular subid
+ *
+ * @param subId
+ */
+ public boolean isImsRegisteredForSubscriber(int subId) {
+ Phone phone = getPhone(subId);
+ if (phone != null) {
+ return phone.isImsRegistered();
+ } else {
+ return false;
+ }
+ }
+
@Override
public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);