summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/duo/Duo.java
diff options
context:
space:
mode:
authorroldenburg <roldenburg@google.com>2017-12-13 15:58:01 -0800
committerCopybara-Service <copybara-piper@google.com>2017-12-13 17:15:26 -0800
commit19c6c256bbb6f6a2d1c5772b6cd85f2a07d50a1c (patch)
treed76206a3e97e4f4af3754dda82469c058a7dd13a /java/com/android/dialer/duo/Duo.java
parent467149161c2754e28f6e6da101141772b017183e (diff)
Add reloadReachabilities to Duo interface
Bug: 70034799 Test: DuoImplTest, GoogleDialtactsActivityTest PiperOrigin-RevId: 178971440 Change-Id: Ib624bd340fbeac11474db198763ae77eddb03ae3
Diffstat (limited to 'java/com/android/dialer/duo/Duo.java')
-rw-r--r--java/com/android/dialer/duo/Duo.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/java/com/android/dialer/duo/Duo.java b/java/com/android/dialer/duo/Duo.java
index 9012dee4f..5f49e3e7e 100644
--- a/java/com/android/dialer/duo/Duo.java
+++ b/java/com/android/dialer/duo/Duo.java
@@ -30,6 +30,7 @@ import java.util.List;
/** Interface for Duo video call integration. */
public interface Duo {
+ /** @return true if the Duo integration is enabled on this device. */
boolean isEnabled(@NonNull Context context);
/**
@@ -38,32 +39,53 @@ public interface Duo {
*/
boolean isActivated(@NonNull Context context);
+ /** @return true if the parameter number is reachable on Duo. */
@MainThread
boolean isReachable(@NonNull Context context, @Nullable String number);
- /** @return {@code null} if result is unknown. */
+ /**
+ * @return true if the number supports upgrading a voice call to a Duo video call. Returns {@code
+ * null} if result is unknown.
+ */
@MainThread
Optional<Boolean> supportsUpgrade(@NonNull Context context, @Nullable String number);
+ /** Starts a task to update the reachability of the parameter numbers asynchronously. */
@MainThread
void updateReachability(@NonNull Context context, @NonNull List<String> numbers);
+ /**
+ * Clears the current reachability data and starts a task to load the latest reachability data
+ * asynchronously.
+ */
+ @MainThread
+ void reloadReachability(@NonNull Context context);
+
+ /**
+ * @return an Intent to start a Duo video call with the parameter number. Must be started using
+ * startActivityForResult.
+ */
@MainThread
Intent getIntent(@NonNull Context context, @NonNull String number);
+ /** Requests upgrading the parameter ongoing call to a Duo video call. */
@MainThread
void requestUpgrade(@NonNull Context context, Call call);
+ /** Registers a listener for reachability data changes. */
@MainThread
void registerListener(@NonNull DuoListener listener);
+ /** Unregisters a listener for reachability data changes. */
@MainThread
void unregisterListener(@NonNull DuoListener listener);
+ /** The string resource to use for outgoing Duo call entries in call details. */
@StringRes
@MainThread
int getOutgoingCallTypeText();
+ /** The string resource to use for incoming Duo call entries in call details. */
@StringRes
@MainThread
int getIncomingCallTypeText();