From 9e7bdf1c62cc5fdc80ce59867e0892b7ef8a54fc Mon Sep 17 00:00:00 2001 From: Suresh Koleti Date: Mon, 21 Jun 2021 20:04:38 +0530 Subject: IMS: Define new property for multi sim voice capability - Define new property ril.multisim.voice_capability. - Introduce helper API "isConcurrentCallsPossible" to know concurrent calls possible or not. Change-Id: I8057825f2f8b15cb583a566997c0e6cc6e9ff865 CRs-Fixed: 2989022 --- .../java/android/telephony/TelephonyManager.java | 29 ++++++++++++++++++++++ .../internal/telephony/TelephonyProperties.java | 6 +++++ 2 files changed, 35 insertions(+) (limited to 'telephony/java') diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index bf36a25e342b..9175207a6e34 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -471,6 +471,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 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"; } -- cgit v1.2.3