diff options
author | Suresh Koleti <skoleti@codeaurora.org> | 2021-06-21 20:04:38 +0530 |
---|---|---|
committer | Suresh Koleti <skoleti@codeaurora.org> | 2021-07-13 16:39:46 +0530 |
commit | 9e7bdf1c62cc5fdc80ce59867e0892b7ef8a54fc (patch) | |
tree | 1dd71b5efdbfcc5de025b3bc42676f06505d9339 /telephony/java/android | |
parent | 39c15671f470704c3598ff2fe1455a6f46523fd5 (diff) |
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
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 29 |
1 files changed, 29 insertions, 0 deletions
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 @@ -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). |