summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/precall
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-11-23 02:45:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-11-23 02:45:49 +0000
commite9641f8664ee9d313c1f3889a3e1e34f593d7837 (patch)
tree6d97ae7ea8e40418662d25141e8393e0cbbbdc20 /java/com/android/dialer/precall
parent8bfd9a8caae7b2c996c330dcd6d2daafe0975ee5 (diff)
parent38af651c6e0181957533fc31fca265c09dab05d2 (diff)
Merge "Prevent SIM selection and change SIM from showing when there are active calls"
Diffstat (limited to 'java/com/android/dialer/precall')
-rw-r--r--java/com/android/dialer/precall/impl/CallingAccountSelector.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/java/com/android/dialer/precall/impl/CallingAccountSelector.java b/java/com/android/dialer/precall/impl/CallingAccountSelector.java
index 8d3df2360..5d928b4fb 100644
--- a/java/com/android/dialer/precall/impl/CallingAccountSelector.java
+++ b/java/com/android/dialer/precall/impl/CallingAccountSelector.java
@@ -54,6 +54,7 @@ import com.android.dialer.preferredsim.PreferredSimFallbackContract;
import com.android.dialer.preferredsim.PreferredSimFallbackContract.PreferredSim;
import com.android.dialer.preferredsim.suggestion.SimSuggestionComponent;
import com.android.dialer.preferredsim.suggestion.SuggestionProvider.Suggestion;
+import com.android.dialer.telecom.TelecomUtil;
import com.google.common.base.Optional;
import java.util.ArrayList;
import java.util.List;
@@ -87,6 +88,17 @@ public class CallingAccountSelector implements PreCallAction {
if (accounts.size() <= 1) {
return false;
}
+
+ if (TelecomUtil.isInManagedCall(context)) {
+ // Most devices are DSDS (dual SIM dual standby) which only one SIM can have active calls at
+ // a time. Telecom will ignore the phone account handle and use the current active SIM, thus
+ // there's no point of selecting SIMs
+ // TODO(a bug): let the user know selections are not available and preferred SIM is not
+ // used
+ // TODO(twyen): support other dual SIM modes when the API is exposed.
+ return false;
+ }
+
return true;
}