summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2018-04-05 12:50:50 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-04-05 12:50:50 -0700
commit3ed49c1f4ae47a066a533f34332d73a57bf878e5 (patch)
tree119536d53f1f7917b799673c7ee52316a5854f03
parent258d99af9a5a14a65a9350b530f2f449bca86dfd (diff)
parent15377a9c79c5870a0745aa456155cbe434d9665a (diff)
Merge "Expand Duo Interface" am: 51a10f66f3
am: 15377a9c79 Change-Id: I88c043eaac22ee7307f5ce52cb50d489bad8b68b
-rw-r--r--java/com/android/dialer/duo/Duo.java38
1 files changed, 36 insertions, 2 deletions
diff --git a/java/com/android/dialer/duo/Duo.java b/java/com/android/dialer/duo/Duo.java
index d471a7adf..d2a5491fd 100644
--- a/java/com/android/dialer/duo/Duo.java
+++ b/java/com/android/dialer/duo/Duo.java
@@ -100,15 +100,49 @@ public interface Duo {
/** Reachability information for a number. */
@AutoValue
abstract class ReachabilityData {
+ public enum Status {
+ UNKNOWN,
+
+ /**
+ * The number is callable. Apps should further look up “AUDIO_CALLABLE” and “VIDEO_CALLABLE”
+ * keys for supported modes.
+ */
+ CALL,
+
+ /** The number is not callable. Apps can send an invite to the contact via INVITE intent. */
+ INVITE,
+
+ /**
+ * Neither Tachystick nor Duo is registered. Apps should show “setup” icon and send REGISTER
+ * intent to.
+ */
+ SETUP,
+
+ /**
+ * Indicates that the number is callable but user needs to set up (Tachystick/Duo) before
+ * calling.
+ */
+ SETUP_AND_CALL
+ }
+
+ public abstract Status status();
+
public abstract String number();
+ public abstract boolean audioCallable();
+
public abstract boolean videoCallable();
public abstract boolean supportsUpgrade();
public static ReachabilityData create(
- String number, boolean videoCallable, boolean supportsUpgrade) {
- return new AutoValue_Duo_ReachabilityData(number, videoCallable, supportsUpgrade);
+ Status status,
+ String number,
+ boolean audioCallable,
+ boolean videoCallable,
+ boolean supportsUpgrade) {
+ return new AutoValue_Duo_ReachabilityData(
+ status, number, audioCallable, videoCallable, supportsUpgrade);
}
}
}