Add more boilerplate to the incallui.

Bug: 73774242
Test: unit tests where they exist
PiperOrigin-RevId: 189853302
Change-Id: Ibf3431cc0d7716c2c53c7ea165dfc130102a1bc7
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 5d2b147..2ce4550 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -136,6 +136,7 @@
       new CopyOnWriteArrayList<>();
   private final VideoTechManager videoTechManager;
 
+  private boolean isSpeakEasyCall;
   private boolean isEmergencyCall;
   private Uri handle;
   private int state = State.INVALID;
@@ -1544,6 +1545,25 @@
     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.