summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllogutils/CallbackActionHelper.java
diff options
context:
space:
mode:
authorroldenburg <roldenburg@google.com>2017-10-13 18:42:20 -0700
committerEric Erfanian <erfanian@google.com>2017-10-16 10:18:09 -0700
commit4f02639a38aa0fe522cfeb4c316d5bdffdeca7cd (patch)
treece3e26f0b407cea2707b4c4e598e5fcfa8a90375 /java/com/android/dialer/calllogutils/CallbackActionHelper.java
parent4114f539e72fa7b3be26949a2b33aa8ce25a68ea (diff)
Rename Lightbringer to Duo
Now that our Duo integration is public, we no longer need a code name. To avoid any disruption, logging and config related names were not changed. Bug: 63753964 Test: manual, existing tests PiperOrigin-RevId: 172172738 Change-Id: Ib9d3d80761944d850c8c4886def9fef9a28539a4
Diffstat (limited to 'java/com/android/dialer/calllogutils/CallbackActionHelper.java')
-rw-r--r--java/com/android/dialer/calllogutils/CallbackActionHelper.java28
1 files changed, 11 insertions, 17 deletions
diff --git a/java/com/android/dialer/calllogutils/CallbackActionHelper.java b/java/com/android/dialer/calllogutils/CallbackActionHelper.java
index 297d5e649..304994305 100644
--- a/java/com/android/dialer/calllogutils/CallbackActionHelper.java
+++ b/java/com/android/dialer/calllogutils/CallbackActionHelper.java
@@ -20,8 +20,8 @@ import android.content.Context;
import android.provider.CallLog.Calls;
import android.support.annotation.IntDef;
import android.text.TextUtils;
-import com.android.dialer.lightbringer.Lightbringer;
-import com.android.dialer.lightbringer.LightbringerComponent;
+import com.android.dialer.duo.Duo;
+import com.android.dialer.duo.DuoComponent;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -30,16 +30,11 @@ public class CallbackActionHelper {
/** Specifies the action a user can take to make a callback. */
@Retention(RetentionPolicy.SOURCE)
- @IntDef({
- CallbackAction.NONE,
- CallbackAction.IMS_VIDEO,
- CallbackAction.LIGHTBRINGER,
- CallbackAction.VOICE
- })
+ @IntDef({CallbackAction.NONE, CallbackAction.IMS_VIDEO, CallbackAction.DUO, CallbackAction.VOICE})
public @interface CallbackAction {
int NONE = 0;
int IMS_VIDEO = 1;
- int LIGHTBRINGER = 2;
+ int DUO = 2;
int VOICE = 3;
}
@@ -55,8 +50,7 @@ public class CallbackActionHelper {
*/
public static @CallbackAction int getCallbackAction(
String number, int features, String phoneAccountComponentName, Context context) {
- return getCallbackAction(
- number, features, isLightbringerCall(phoneAccountComponentName, context));
+ return getCallbackAction(number, features, isDuoCall(phoneAccountComponentName, context));
}
/**
@@ -64,16 +58,16 @@ public class CallbackActionHelper {
*
* @param number The phone number in column {@link android.provider.CallLog.Calls#NUMBER}.
* @param features Value of features in column {@link android.provider.CallLog.Calls#FEATURES}.
- * @param isLightbringerCall Whether the call is a Lightbringer call.
+ * @param isDuoCall Whether the call is a Duo call.
* @return One of the values in {@link CallbackAction}
*/
public static @CallbackAction int getCallbackAction(
- String number, int features, boolean isLightbringerCall) {
+ String number, int features, boolean isDuoCall) {
if (TextUtils.isEmpty(number)) {
return CallbackAction.NONE;
}
- if (isLightbringerCall) {
- return CallbackAction.LIGHTBRINGER;
+ if (isDuoCall) {
+ return CallbackAction.DUO;
}
boolean isVideoCall = (features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO;
@@ -84,8 +78,8 @@ public class CallbackActionHelper {
return CallbackAction.VOICE;
}
- private static boolean isLightbringerCall(String phoneAccountComponentName, Context context) {
- Lightbringer lightBringer = LightbringerComponent.get(context).getLightbringer();
+ private static boolean isDuoCall(String phoneAccountComponentName, Context context) {
+ Duo lightBringer = DuoComponent.get(context).getDuo();
return lightBringer.getPhoneAccountComponentName() != null
&& lightBringer
.getPhoneAccountComponentName()