Add a resource overlay to define whether 5G can be connected in DSDS

Bug: 152786064
Test: build and manual
Change-Id: Iba14340830ff3f0334bd0c8add18597330051f8a
diff --git a/res/values/config.xml b/res/values/config.xml
index 2f0fcc6..9b2605d 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -285,4 +285,9 @@
          slot. If true, telephony will always try to place the emergency call on the subscription
          associated with default data first, instead of using the default voice configuration.-->
     <bool name="config_gnss_supl_requires_default_data_for_emergency">false</bool>
+
+    <!-- Whether a device can have 5G connection in DSDS mode. It should be true by default, but
+         in some devices per modem limitation 5G network can't be connected if two or more SIMs
+         are active simultaneously. In that case, this value should be false. -->
+    <bool name="config_5g_connection_in_dsds_mode">true</bool>
 </resources>
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 98af8e6..fb177e1 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -8504,4 +8504,9 @@
                     USER_ACTIVITY_NOTIFICATION_DELAY);
         }
     }
+
+    @Override
+    public boolean canConnectTo5GInDsdsMode() {
+        return mApp.getResources().getBoolean(R.bool.config_5g_connection_in_dsds_mode);
+    }
 }