summaryrefslogtreecommitdiff
path: root/telephony/java
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java29
-rw-r--r--telephony/java/com/android/internal/telephony/TelephonyProperties.java6
2 files changed, 35 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index ab2c7a535371..2bf411f8afc2 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -472,6 +472,35 @@ public class TelephonyManager {
}
/**
+ * The allowed values for multi sim voice capability
+ *
+ * @hide
+ */
+ public interface MultiSimVoiceCapability {
+ /** default */
+ static final int UNKNOWN = 0;
+ /** Concurrent calls on both subscriptions are not possbile. */
+ static final int DSDS = 1;
+ /** Concurrent calls on both subscriptions are not possible but user will have option to
+ * accept MT call on one subscription when there is an ongoing call on another subscription.
+ */
+ static final int PSEUDO_DSDA = 2;
+ /** Concurrent calls on both subscriptions are possible */
+ static final int DSDA = 3;
+ }
+
+ /**
+ * Returns true if concurrent calls on both subscriptions are possible (ex: DSDA).
+ * Returns false for other cases.
+ */
+ /** {@hide} */
+ public static boolean isConcurrentCallsPossible() {
+ int mSimVoiceConfig = TelephonyProperties.multi_sim_voice_capability().orElse(
+ MultiSimVoiceCapability.UNKNOWN);
+ return mSimVoiceConfig == MultiSimVoiceCapability.DSDA;
+ }
+
+ /**
* Returns the number of phones available.
* Returns 0 if none of voice, sms, data is not supported
* Returns 1 for Single standby mode (Single SIM functionality).
diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
index 29286e8f429e..4a8d414ae446 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
@@ -241,4 +241,10 @@ public interface TelephonyProperties
* Type: int
*/
static final String PROPERTY_MAX_ACTIVE_MODEMS = "telephony.active_modems.max_count";
+
+ /**
+ * Property to store multi sim voice capability configuration.
+ * Type: int posssible values are @link TelephonyManager#MultiSimVoiceCapability.
+ */
+ static final String PROPERTY_MULTISIM_VOICE_CAPABILITY = "ril.multisim.voice_capability";
}