Add isActivated check to Duo interface
Bug: 70034799
Test: GoogleCallLogAdapterTest
PiperOrigin-RevId: 178292533
Change-Id: I9769a7fbe0edcc42eff99d636334a0c2eaf14779
diff --git a/java/com/android/dialer/duo/Duo.java b/java/com/android/dialer/duo/Duo.java
index 839c1d3..ff694c0 100644
--- a/java/com/android/dialer/duo/Duo.java
+++ b/java/com/android/dialer/duo/Duo.java
@@ -31,6 +31,12 @@
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 82b9c79..7cc8f78 100644
--- a/java/com/android/dialer/duo/stub/DuoStub.java
+++ b/java/com/android/dialer/duo/stub/DuoStub.java
@@ -40,6 +40,11 @@
return false;
}
+ @Override
+ public boolean isActivated(@NonNull Context context) {
+ return false;
+ }
+
@MainThread
@Override
public boolean isReachable(@NonNull Context context, @Nullable String number) {