Modify PhoneCapabilities for device capabilities

Add getPhoneCapability API
Update old PhoneCapability methods to use new fields

Test: atest FrameworksTelephonyTests
Bug: 143238237
Bug: 143238191
Change-Id: I9f5312606b1dc5fc8bd25569f194475be2e20a95
Merged-In: I9f5312606b1dc5fc8bd25569f194475be2e20a95
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index f11da4b..1987756 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -2967,6 +2967,21 @@
     }
 
     @Override
+    public PhoneCapability getPhoneCapability(int subId, String callingPackage,
+                String callingFeatureId) {
+        if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
+                mApp, subId, callingPackage, callingFeatureId, "getPhoneCapability")) {
+            return null;
+        }
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            return mPhoneConfigurationManager.getStaticPhoneCapability();
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    @Override
     public boolean isInEmergencySmsMode() {
         enforceReadPrivilegedPermission("isInEmergencySmsMode");
         final long identity = Binder.clearCallingIdentity();
@@ -7691,7 +7706,7 @@
             loge("isMultiSimSupportedInternal: no static configuration available");
             return TelephonyManager.MULTISIM_NOT_SUPPORTED_BY_HARDWARE;
         }
-        if (staticCapability.logicalModemList.size() < 2) {
+        if (staticCapability.getLogicalModemUuids().size() < 2) {
             loge("isMultiSimSupportedInternal: maximum number of modem is < 2");
             return TelephonyManager.MULTISIM_NOT_SUPPORTED_BY_HARDWARE;
         }