summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/call/DialerCall.java
diff options
context:
space:
mode:
authorerfanian <erfanian@google.com>2018-03-20 19:42:26 -0700
committerCopybara-Service <copybara-piper@google.com>2018-03-20 19:43:10 -0700
commitd05d899b641349f5da46a7ab5964591a03b72d95 (patch)
treeea740e9cee2e26be44f93bb2e65b7ca164ac6bbf /java/com/android/incallui/call/DialerCall.java
parent0f2cfb47feff5fa979931318b23594a14eb4af02 (diff)
Add more boilerplate to the incallui.
Bug: 73774242 Test: unit tests where they exist PiperOrigin-RevId: 189853302 Change-Id: Ibf3431cc0d7716c2c53c7ea165dfc130102a1bc7
Diffstat (limited to 'java/com/android/incallui/call/DialerCall.java')
-rw-r--r--java/com/android/incallui/call/DialerCall.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 5d2b1471d..2ce4550bb 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -136,6 +136,7 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
new CopyOnWriteArrayList<>();
private final VideoTechManager videoTechManager;
+ private boolean isSpeakEasyCall;
private boolean isEmergencyCall;
private Uri handle;
private int state = State.INVALID;
@@ -1544,6 +1545,25 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
this.preferredAccountRecorder = preferredAccountRecorder;
}
+ /** Indicates the call is eligible for SpeakEasy */
+ public boolean isSpeakEasyEligible() {
+ // TODO(erfanian): refactor key location
+ return ConfigProviderBindings.get(context).getBoolean("speak_easy_enabled", false);
+ }
+
+ /** Indicates the user has selected SpeakEasy */
+ public boolean isSpeakEasyCall() {
+ if (!isSpeakEasyEligible()) {
+ return false;
+ }
+ return isSpeakEasyCall;
+ }
+
+ /** Sets the user preference for SpeakEasy */
+ public void setIsSpeakEasyCall(boolean isSpeakEasyCall) {
+ this.isSpeakEasyCall = isSpeakEasyCall;
+ }
+
/**
* Specifies whether a number is in the call history or not. {@link #CALL_HISTORY_STATUS_UNKNOWN}
* means there is no result.