diff options
author | twyen <twyen@google.com> | 2018-05-07 16:36:17 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-09 16:53:51 -0700 |
commit | b2b6365629aed422a006529fe7940612f778baed (patch) | |
tree | ac481d7c67921e64c957dafcd7b553b2be0f7c93 /java/com/android/dialer/duo/Duo.java | |
parent | d7c058c4e1bfd772e514f6d09deb21d7893d28c8 (diff) |
Place Duo calls with PreCall
This CL consolidates common duo calling operations into precall, including checking reachability, falling back to carrier video call, placing the call to duo with startActivityForResult.
TEST=TAP
Bug: 78783816
Test: TAP
PiperOrigin-RevId: 195742478
Change-Id: I9fea1e4999f604e1f3a153b28079cd0db77b7393
Diffstat (limited to 'java/com/android/dialer/duo/Duo.java')
-rw-r--r-- | java/com/android/dialer/duo/Duo.java | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/java/com/android/dialer/duo/Duo.java b/java/com/android/dialer/duo/Duo.java index 06a3db063..85fe9fbc1 100644 --- a/java/com/android/dialer/duo/Duo.java +++ b/java/com/android/dialer/duo/Duo.java @@ -27,6 +27,8 @@ import android.telecom.Call; import android.telecom.PhoneAccountHandle; import com.google.auto.value.AutoValue; import com.google.common.base.Optional; +import com.google.common.collect.ImmutableMap; +import com.google.common.util.concurrent.ListenableFuture; import java.util.List; /** Interface for Duo video call integration. */ @@ -61,7 +63,8 @@ public interface Duo { /** Starts a task to update the reachability of the parameter numbers asynchronously. */ @MainThread - void updateReachability(@NonNull Context context, @NonNull List<String> numbers); + ListenableFuture<ImmutableMap<String, ReachabilityData>> updateReachability( + @NonNull Context context, @NonNull List<String> numbers); /** * Clears the current reachability data and starts a task to load the latest reachability data @@ -95,19 +98,6 @@ public interface Duo { */ Optional<Intent> getInviteIntent(String number); - /** Return value of {@link #getIntentType(Intent)} */ - enum IntentType { - /** The intent is returned by {@link #getCallIntent(String)} */ - CALL, - /** The intent is returned by {@link #getActivateIntent()} */ - ACTIVATE, - /** The intent is returned by {@link #getInviteIntent(String)} */ - INVITE - } - - /** Classifies a Duo intent. Absent if the intent is not a Duo intent. */ - Optional<IntentType> getIntentType(Intent intent); - Optional<Intent> getInstallDuoIntent(); /** Requests upgrading the parameter ongoing call to a Duo video call. */ |