summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroldenburg <roldenburg@google.com>2017-12-07 14:09:24 -0800
committerCopybara-Service <copybara-piper@google.com>2017-12-07 18:33:35 -0800
commit4f6307cd3784a53a76f3e51747bfb06866dad3b2 (patch)
tree5a2cf3cefe259f03e332cb02c9db16065645cd2e
parent25f45be4e54aa5aec3f20fae3bab9e5f803079ca (diff)
Add isActivated check to Duo interface
Bug: 70034799 Test: GoogleCallLogAdapterTest PiperOrigin-RevId: 178292533 Change-Id: I9769a7fbe0edcc42eff99d636334a0c2eaf14779
-rw-r--r--java/com/android/dialer/duo/Duo.java6
-rw-r--r--java/com/android/dialer/duo/stub/DuoStub.java5
2 files changed, 11 insertions, 0 deletions
diff --git a/java/com/android/dialer/duo/Duo.java b/java/com/android/dialer/duo/Duo.java
index 839c1d3a8..ff694c053 100644
--- a/java/com/android/dialer/duo/Duo.java
+++ b/java/com/android/dialer/duo/Duo.java
@@ -31,6 +31,12 @@ public interface Duo {
boolean isEnabled();
+ /**
+ * @return true if Duo is installed and the user has gone through the set-up flow confirming their
+ * phone number.
+ */
+ boolean isActivated(@NonNull Context context);
+
@MainThread
boolean isReachable(@NonNull Context context, @Nullable String number);
diff --git a/java/com/android/dialer/duo/stub/DuoStub.java b/java/com/android/dialer/duo/stub/DuoStub.java
index 82b9c79e3..7cc8f7808 100644
--- a/java/com/android/dialer/duo/stub/DuoStub.java
+++ b/java/com/android/dialer/duo/stub/DuoStub.java
@@ -40,6 +40,11 @@ public class DuoStub implements Duo {
return false;
}
+ @Override
+ public boolean isActivated(@NonNull Context context) {
+ return false;
+ }
+
@MainThread
@Override
public boolean isReachable(@NonNull Context context, @Nullable String number) {