diff options
author | Treehugger Robot <android-build-prod@system.gserviceaccount.com> | 2021-07-21 17:31:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-07-21 17:31:00 +0000 |
commit | 74995693737ddc79b1e76888c1bb06f4bc4520b1 (patch) | |
tree | fc678d5849caa14322cf78ce229250722dc24552 /telephony/java | |
parent | f4e51fcd5c1f3c0bdc8ae36c0f7ab54b1f0bd6dd (diff) | |
parent | 9e7bdf1c62cc5fdc80ce59867e0892b7ef8a54fc (diff) |
Merge "IMS: Define new property for multi sim voice capability" into s-keystone-qcom-dev
Diffstat (limited to 'telephony/java')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 29 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/TelephonyProperties.java | 6 |
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"; } |