diff options
author | twyen <twyen@google.com> | 2018-04-05 12:45:17 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-04-05 12:45:17 -0700 |
commit | 15377a9c79c5870a0745aa456155cbe434d9665a (patch) | |
tree | a2275edf2eb136aefb6f0ee8dd201e0266300711 | |
parent | bccf3c603a29f1e30d37405772882417aab6db7e (diff) | |
parent | 51a10f66f3b86fe91ec777a14a475b85368cfb4c (diff) |
Merge "Expand Duo Interface"
am: 51a10f66f3
Change-Id: I6c2312ab0e2063c552fdaf7b8703c74e945e420b
-rw-r--r-- | java/com/android/dialer/duo/Duo.java | 38 |
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); } } } |