summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/com/android/contacts/common/list/ContactListItemView.java8
-rw-r--r--java/com/android/contacts/common/list/PhoneNumberListAdapter.java8
-rw-r--r--java/com/android/contacts/common/list/PhoneNumberPickerFragment.java9
-rw-r--r--java/com/android/dialer/app/calllog/CallLogAdapter.java33
-rw-r--r--java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java42
-rw-r--r--java/com/android/dialer/app/calllog/IntentProvider.java6
-rw-r--r--java/com/android/dialer/app/list/PhoneFavoritesTileAdapter.java8
-rw-r--r--java/com/android/dialer/binary/aosp/AospDialerRootComponent.java4
-rw-r--r--java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java4
-rw-r--r--java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java4
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsActivity.java13
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsAdapter.java8
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java4
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java10
-rw-r--r--java/com/android/dialer/calldetails/proto/call_details_entries.proto2
-rw-r--r--java/com/android/dialer/calllogutils/CallTypeHelper.java34
-rw-r--r--java/com/android/dialer/calllogutils/CallbackActionHelper.java28
-rw-r--r--java/com/android/dialer/constants/ActivityRequestCodes.java9
-rw-r--r--java/com/android/dialer/duo/Duo.java (renamed from java/com/android/dialer/lightbringer/Lightbringer.java)10
-rw-r--r--java/com/android/dialer/duo/DuoComponent.java (renamed from java/com/android/dialer/lightbringer/LightbringerComponent.java)12
-rw-r--r--java/com/android/dialer/duo/DuoListener.java (renamed from java/com/android/dialer/lightbringer/LightbringerListener.java)6
-rw-r--r--java/com/android/dialer/duo/stub/DuoStub.java (renamed from java/com/android/dialer/lightbringer/stub/LightbringerStub.java)14
-rw-r--r--java/com/android/dialer/duo/stub/StubDuoModule.java (renamed from java/com/android/dialer/lightbringer/stub/StubLightbringerModule.java)8
-rw-r--r--java/com/android/dialer/searchfragment/cp2/SearchContactViewHolder.java4
-rw-r--r--java/com/android/dialer/searchfragment/list/SearchAdapter.java7
-rw-r--r--java/com/android/incallui/call/DialerCall.java11
-rw-r--r--java/com/android/incallui/videotech/duo/DuoVideoTech.java (renamed from java/com/android/incallui/videotech/lightbringer/LightbringerTech.java)38
27 files changed, 163 insertions, 181 deletions
diff --git a/java/com/android/contacts/common/list/ContactListItemView.java b/java/com/android/contacts/common/list/ContactListItemView.java
index c605f4e87..0a5bf094b 100644
--- a/java/com/android/contacts/common/list/ContactListItemView.java
+++ b/java/com/android/contacts/common/list/ContactListItemView.java
@@ -81,12 +81,12 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj
/** IntDef for indices of ViewPager tabs. */
@Retention(RetentionPolicy.SOURCE)
- @IntDef({NONE, VIDEO, LIGHTBRINGER, CALL_AND_SHARE})
+ @IntDef({NONE, VIDEO, DUO, CALL_AND_SHARE})
public @interface CallToAction {}
public static final int NONE = 0;
public static final int VIDEO = 1;
- public static final int LIGHTBRINGER = 2;
+ public static final int DUO = 2;
public static final int CALL_AND_SHARE = 3;
private final PhotoPosition mPhotoPosition = getDefaultPhotoPosition();
@@ -341,13 +341,13 @@ public class ContactListItemView extends ViewGroup implements SelectionBoundsAdj
drawable.setAutoMirrored(true);
description = R.string.description_search_video_call;
onClickListener = v -> listener.onVideoCallIconClicked(position);
- } else if (action == LIGHTBRINGER) {
+ } else if (action == DUO) {
CallIntentBuilder.increaseLightbringerCallButtonAppearInSearchCount();
drawable =
ContextCompat.getDrawable(getContext(), R.drawable.quantum_ic_videocam_vd_theme_24);
drawable.setAutoMirrored(true);
description = R.string.description_search_video_call;
- onClickListener = v -> listener.onLightbringerIconClicked(position);
+ onClickListener = v -> listener.onDuoVideoIconClicked(position);
} else {
mCallToActionView.setVisibility(View.GONE);
mCallToActionView.setOnClickListener(null);
diff --git a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java
index 8cf54b96c..58628d2a3 100644
--- a/java/com/android/contacts/common/list/PhoneNumberListAdapter.java
+++ b/java/com/android/contacts/common/list/PhoneNumberListAdapter.java
@@ -45,11 +45,11 @@ import com.android.dialer.compat.CompatUtils;
import com.android.dialer.configprovider.ConfigProviderBindings;
import com.android.dialer.contactphoto.ContactPhotoManager.DefaultImageRequest;
import com.android.dialer.dialercontact.DialerContact;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.enrichedcall.EnrichedCallCapabilities;
import com.android.dialer.enrichedcall.EnrichedCallComponent;
import com.android.dialer.enrichedcall.EnrichedCallManager;
import com.android.dialer.lettertile.LetterTileDrawable;
-import com.android.dialer.lightbringer.LightbringerComponent;
import com.android.dialer.phonenumberutil.PhoneNumberHelper;
import com.android.dialer.util.CallUtil;
import java.util.ArrayList;
@@ -405,8 +405,8 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
}
if (action == ContactListItemView.NONE
- && LightbringerComponent.get(mContext).getLightbringer().isReachable(mContext, number)) {
- action = ContactListItemView.LIGHTBRINGER;
+ && DuoComponent.get(mContext).getDuo().isReachable(mContext, number)) {
+ action = ContactListItemView.DUO;
}
if (action == ContactListItemView.NONE) {
@@ -576,7 +576,7 @@ public class PhoneNumberListAdapter extends ContactEntryListAdapter {
void onVideoCallIconClicked(int position);
- void onLightbringerIconClicked(int position);
+ void onDuoVideoIconClicked(int position);
void onCallAndShareIconClicked(int position);
}
diff --git a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java
index d704e5492..1a3b80f31 100644
--- a/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java
+++ b/java/com/android/contacts/common/list/PhoneNumberPickerFragment.java
@@ -37,9 +37,9 @@ import com.android.dialer.callintent.CallSpecificAppData;
import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
import com.android.dialer.dialercontact.DialerContact;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.enrichedcall.EnrichedCallComponent;
import com.android.dialer.enrichedcall.EnrichedCallManager;
-import com.android.dialer.lightbringer.LightbringerComponent;
import com.android.dialer.logging.DialerImpression;
import com.android.dialer.logging.Logger;
import com.android.dialer.performancereport.PerformanceReport;
@@ -91,13 +91,10 @@ public class PhoneNumberPickerFragment extends ContactEntryListFragment<ContactE
}
@Override
- public void onLightbringerIconClicked(int position) {
+ public void onDuoVideoIconClicked(int position) {
PerformanceReport.stopRecording();
String phoneNumber = getPhoneNumber(position);
- Intent intent =
- LightbringerComponent.get(getContext())
- .getLightbringer()
- .getIntent(getContext(), phoneNumber);
+ Intent intent = DuoComponent.get(getContext()).getDuo().getIntent(getContext(), phoneNumber);
// DialtactsActivity.ACTIVITY_REQUEST_CODE_LIGHTBRINGER
// Cannot reference because of cyclic dependencies
Logger.get(getContext())
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java
index 228321581..679901e9f 100644
--- a/java/com/android/dialer/app/calllog/CallLogAdapter.java
+++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java
@@ -73,12 +73,12 @@ import com.android.dialer.common.concurrent.AsyncTaskExecutor;
import com.android.dialer.common.concurrent.AsyncTaskExecutors;
import com.android.dialer.compat.android.provider.VoicemailCompat;
import com.android.dialer.configprovider.ConfigProviderBindings;
+import com.android.dialer.duo.Duo;
+import com.android.dialer.duo.DuoComponent;
+import com.android.dialer.duo.DuoListener;
import com.android.dialer.enrichedcall.EnrichedCallCapabilities;
import com.android.dialer.enrichedcall.EnrichedCallComponent;
import com.android.dialer.enrichedcall.EnrichedCallManager;
-import com.android.dialer.lightbringer.Lightbringer;
-import com.android.dialer.lightbringer.LightbringerComponent;
-import com.android.dialer.lightbringer.LightbringerListener;
import com.android.dialer.logging.ContactSource;
import com.android.dialer.logging.DialerImpression;
import com.android.dialer.logging.Logger;
@@ -96,7 +96,7 @@ import java.util.Set;
/** Adapter class to fill in data for the Call Log. */
public class CallLogAdapter extends GroupingListAdapter
- implements GroupCreator, OnVoicemailDeletedListener, LightbringerListener {
+ implements GroupCreator, OnVoicemailDeletedListener, DuoListener {
// Types of activities the call log adapter is used for
public static final int ACTIVITY_TYPE_CALL_LOG = 1;
@@ -382,13 +382,13 @@ public class CallLogAdapter extends GroupingListAdapter
}
expandViewHolderActions(viewHolder);
- if (isLightbringerCallButtonVisible(viewHolder.videoCallButtonView)) {
+ if (isDuoCallButtonVisible(viewHolder.videoCallButtonView)) {
CallIntentBuilder.increaseLightbringerCallButtonAppearInExpandedCallLogItemCount();
}
}
}
- private boolean isLightbringerCallButtonVisible(View videoCallButtonView) {
+ private boolean isDuoCallButtonVisible(View videoCallButtonView) {
if (videoCallButtonView == null) {
return false;
}
@@ -399,8 +399,7 @@ public class CallLogAdapter extends GroupingListAdapter
if (intentProvider == null) {
return false;
}
- String packageName =
- LightbringerComponent.get(mActivity).getLightbringer().getPackageName();
+ String packageName = DuoComponent.get(mActivity).getDuo().getPackageName();
if (packageName == null) {
return false;
}
@@ -670,12 +669,12 @@ public class CallLogAdapter extends GroupingListAdapter
}
mContactsPreferences.refreshValue(ContactsPreferences.DISPLAY_ORDER_KEY);
mIsSpamEnabled = Spam.get(mActivity).isSpamEnabled();
- getLightbringer().registerListener(this);
+ getDuo().registerListener(this);
notifyDataSetChanged();
}
public void onPause() {
- getLightbringer().unregisterListener(this);
+ getDuo().unregisterListener(this);
pauseCache();
for (Uri uri : mHiddenItemUris) {
CallLogAsyncTaskUtil.deleteVoicemail(mActivity, uri, null);
@@ -846,7 +845,7 @@ public class CallLogAdapter extends GroupingListAdapter
// attempt to set the field properly in that case
views.isCallComposerCapable = isCallComposerCapable(views.number);
views.setDetailedPhoneDetails(callDetailsEntries);
- views.lightbringerReady = getLightbringer().isReachable(mActivity, views.number);
+ views.duoReady = getDuo().isReachable(mActivity, views.number);
final AsyncTask<Void, Void, Boolean> loadDataTask =
new AsyncTask<Void, Void, Boolean>() {
@Override
@@ -982,12 +981,12 @@ public class CallLogAdapter extends GroupingListAdapter
.setFeatures(cursor.getInt(CallLogQuery.FEATURES));
String phoneAccountComponentName = cursor.getString(CallLogQuery.ACCOUNT_COMPONENT_NAME);
- if (getLightbringer().getPhoneAccountComponentName() != null
- && getLightbringer()
+ if (getDuo().getPhoneAccountComponentName() != null
+ && getDuo()
.getPhoneAccountComponentName()
.flattenToString()
.equals(phoneAccountComponentName)) {
- entry.setIsLightbringerCall(true);
+ entry.setIsDuoCall(true);
}
entries.addEntries(entry.build());
@@ -1405,12 +1404,12 @@ public class CallLogAdapter extends GroupingListAdapter
}
@NonNull
- private Lightbringer getLightbringer() {
- return LightbringerComponent.get(mActivity).getLightbringer();
+ private Duo getDuo() {
+ return DuoComponent.get(mActivity).getDuo();
}
@Override
- public void onLightbringerStateChanged() {
+ public void onDuoStateChanged() {
notifyDataSetChanged();
}
diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
index ca846aebb..f0852bdb5 100644
--- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
+++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
@@ -75,10 +75,10 @@ import com.android.dialer.constants.ActivityRequestCodes;
import com.android.dialer.contactphoto.ContactPhotoManager;
import com.android.dialer.dialercontact.DialerContact;
import com.android.dialer.dialercontact.SimDetails;
+import com.android.dialer.duo.Duo;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.lettertile.LetterTileDrawable;
import com.android.dialer.lettertile.LetterTileDrawable.ContactType;
-import com.android.dialer.lightbringer.Lightbringer;
-import com.android.dialer.lightbringer.LightbringerComponent;
import com.android.dialer.logging.ContactSource;
import com.android.dialer.logging.ContactSource.Type;
import com.android.dialer.logging.DialerImpression;
@@ -222,7 +222,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
public boolean isSpam;
public boolean isCallComposerCapable;
- public boolean lightbringerReady;
+ public boolean duoReady;
private View.OnClickListener mExpandCollapseListener;
private final OnActionModeStateChangedListener onActionModeStateChangedListener;
@@ -533,10 +533,10 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
primaryActionButtonView.setImageResource(R.drawable.quantum_ic_videocam_vd_theme_24);
primaryActionButtonView.setVisibility(View.VISIBLE);
break;
- case CallbackAction.LIGHTBRINGER:
- if (showLightbringerPrimaryButton()) {
+ case CallbackAction.DUO:
+ if (showDuoPrimaryButton()) {
CallIntentBuilder.increaseLightbringerCallButtonAppearInCollapsedCallLogItemCount();
- primaryActionButtonView.setTag(IntentProvider.getLightbringerIntentProvider(number));
+ primaryActionButtonView.setTag(IntentProvider.getDuoVideoIntentProvider(number));
} else {
primaryActionButtonView.setTag(
IntentProvider.getReturnVideoCallIntentProvider(number, accountHandle));
@@ -644,21 +644,21 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
switch (callbackAction) {
case CallbackAction.IMS_VIDEO:
- case CallbackAction.LIGHTBRINGER:
- // For an IMS video call or a Lightbringer call, the secondary action should always be a
+ case CallbackAction.DUO:
+ // For an IMS video call or a Duo call, the secondary action should always be a
// voice callback.
callButtonView.setVisibility(View.VISIBLE);
videoCallButtonView.setVisibility(View.GONE);
break;
case CallbackAction.VOICE:
// For a voice call, set the secondary callback action to be an IMS video call if it is
- // available. Otherwise try to set it as a Lightbringer call.
+ // available. Otherwise try to set it as a Duo call.
if (CallUtil.isVideoEnabled(mContext)
&& (hasPlacedCarrierVideoCall() || canSupportCarrierVideoCall())) {
videoCallButtonView.setTag(IntentProvider.getReturnVideoCallIntentProvider(number));
videoCallButtonView.setVisibility(View.VISIBLE);
- } else if (lightbringerReady) {
- videoCallButtonView.setTag(IntentProvider.getLightbringerIntentProvider(number));
+ } else if (duoReady) {
+ videoCallButtonView.setTag(IntentProvider.getDuoVideoIntentProvider(number));
videoCallButtonView.setVisibility(View.VISIBLE);
}
break;
@@ -744,10 +744,10 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
return false;
}
- private boolean showLightbringerPrimaryButton() {
+ private boolean showDuoPrimaryButton() {
return accountHandle != null
- && accountHandle.getComponentName().equals(getLightbringer().getPhoneAccountComponentName())
- && lightbringerReady;
+ && accountHandle.getComponentName().equals(getDuo().getPhoneAccountComponentName())
+ && duoReady;
}
private static boolean hasDialableChar(CharSequence number) {
@@ -958,10 +958,10 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
return;
}
- // We check to see if we are starting a Lightbringer intent. The reason is Lightbringer
+ // We check to see if we are starting a Duo intent. The reason is Duo
// intents need to be started using startActivityForResult instead of the usual startActivity
String packageName = intent.getPackage();
- if (packageName != null && packageName.equals(getLightbringer().getPackageName())) {
+ if (packageName != null && packageName.equals(getDuo().getPackageName())) {
Logger.get(mContext)
.logImpression(DialerImpression.Type.LIGHTBRINGER_VIDEO_REQUESTED_FROM_CALL_LOG);
if (isNonContactEntry(info)) {
@@ -969,7 +969,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
.logImpression(
DialerImpression.Type.LIGHTBRINGER_NON_CONTACT_VIDEO_REQUESTED_FROM_CALL_LOG);
}
- startLightbringerActivity(intent);
+ startDuoActivity(intent);
} else if (CallDetailsActivity.isLaunchIntent(intent)) {
PerformanceReport.recordClick(UiAction.Type.OPEN_CALL_DETAIL);
((Activity) mContext)
@@ -993,10 +993,10 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
return false;
}
- private void startLightbringerActivity(Intent intent) {
+ private void startDuoActivity(Intent intent) {
try {
Activity activity = (Activity) mContext;
- activity.startActivityForResult(intent, ActivityRequestCodes.DIALTACTS_LIGHTBRINGER);
+ activity.startActivityForResult(intent, ActivityRequestCodes.DIALTACTS_DUO);
} catch (ActivityNotFoundException e) {
Toast.makeText(mContext, R.string.activity_not_available, Toast.LENGTH_SHORT).show();
}
@@ -1126,8 +1126,8 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
}
@NonNull
- private Lightbringer getLightbringer() {
- return LightbringerComponent.get(mContext).getLightbringer();
+ private Duo getDuo() {
+ return DuoComponent.get(mContext).getDuo();
}
@Override
diff --git a/java/com/android/dialer/app/calllog/IntentProvider.java b/java/com/android/dialer/app/calllog/IntentProvider.java
index 5030de5f5..c812bf83b 100644
--- a/java/com/android/dialer/app/calllog/IntentProvider.java
+++ b/java/com/android/dialer/app/calllog/IntentProvider.java
@@ -31,7 +31,7 @@ import com.android.dialer.calldetails.CallDetailsEntries;
import com.android.dialer.callintent.CallInitiationType;
import com.android.dialer.callintent.CallIntentBuilder;
import com.android.dialer.dialercontact.DialerContact;
-import com.android.dialer.lightbringer.LightbringerComponent;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.util.CallUtil;
import com.android.dialer.util.IntentUtil;
import java.util.ArrayList;
@@ -91,11 +91,11 @@ public abstract class IntentProvider {
};
}
- public static IntentProvider getLightbringerIntentProvider(String number) {
+ public static IntentProvider getDuoVideoIntentProvider(String number) {
return new IntentProvider() {
@Override
public Intent getIntent(Context context) {
- return LightbringerComponent.get(context).getLightbringer().getIntent(context, number);
+ return DuoComponent.get(context).getDuo().getIntent(context, number);
}
};
}
diff --git a/java/com/android/dialer/app/list/PhoneFavoritesTileAdapter.java b/java/com/android/dialer/app/list/PhoneFavoritesTileAdapter.java
index cd5712eed..cd5843c85 100644
--- a/java/com/android/dialer/app/list/PhoneFavoritesTileAdapter.java
+++ b/java/com/android/dialer/app/list/PhoneFavoritesTileAdapter.java
@@ -41,8 +41,8 @@ import com.android.contacts.common.preference.ContactsPreferences;
import com.android.dialer.app.R;
import com.android.dialer.common.LogUtil;
import com.android.dialer.contactphoto.ContactPhotoManager;
-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 com.android.dialer.logging.InteractionEvent;
import com.android.dialer.logging.Logger;
import com.android.dialer.shortcuts.ShortcutRefresher;
@@ -303,11 +303,11 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements OnDragDrop
ShortcutRefresher.refresh(mContext, mContactEntries);
notifyDataSetChanged();
- Lightbringer lightbringer = LightbringerComponent.get(mContext).getLightbringer();
+ Duo duo = DuoComponent.get(mContext).getDuo();
for (ContactEntry contact : mContactEntries) {
if (contact.phoneNumber == null) {
multipleNumbersContactsCount++;
- } else if (lightbringer.isReachable(mContext, contact.phoneNumber)) {
+ } else if (duo.isReachable(mContext, contact.phoneNumber)) {
lightbringerReachableContactsCount++;
}
}
diff --git a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
index d61f71260..3edc73cfe 100644
--- a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
+++ b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
@@ -20,9 +20,9 @@ import com.android.dialer.binary.basecomponent.BaseDialerRootComponent;
import com.android.dialer.calllog.CallLogModule;
import com.android.dialer.common.concurrent.DialerExecutorModule;
import com.android.dialer.configprovider.SharedPrefConfigProviderModule;
+import com.android.dialer.duo.stub.StubDuoModule;
import com.android.dialer.enrichedcall.stub.StubEnrichedCallModule;
import com.android.dialer.inject.ContextModule;
-import com.android.dialer.lightbringer.stub.StubLightbringerModule;
import com.android.dialer.phonenumbergeoutil.impl.PhoneNumberGeoUtilModule;
import com.android.dialer.simulator.impl.SimulatorModule;
import com.android.dialer.storage.StorageModule;
@@ -49,7 +49,7 @@ import javax.inject.Singleton;
StubEnrichedCallModule.class,
StubMapsModule.class,
VoicemailModule.class,
- StubLightbringerModule.class
+ StubDuoModule.class
}
)
public interface AospDialerRootComponent extends BaseDialerRootComponent {}
diff --git a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
index 580eb5d34..c3ca56511 100644
--- a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
+++ b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
@@ -20,8 +20,8 @@ import com.android.dialer.calllog.CallLogComponent;
import com.android.dialer.calllog.database.CallLogDatabaseComponent;
import com.android.dialer.common.concurrent.DialerExecutorComponent;
import com.android.dialer.configprovider.ConfigProviderComponent;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.enrichedcall.EnrichedCallComponent;
-import com.android.dialer.lightbringer.LightbringerComponent;
import com.android.dialer.main.MainComponent;
import com.android.dialer.phonenumbergeoutil.PhoneNumberGeoUtilComponent;
import com.android.dialer.simulator.SimulatorComponent;
@@ -49,4 +49,4 @@ public interface BaseDialerRootComponent
StorageComponent.HasComponent,
StrictModeComponent.HasComponent,
VoicemailComponent.HasComponent,
- LightbringerComponent.HasComponent {}
+ DuoComponent.HasComponent {}
diff --git a/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java b/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
index 87f09c8dd..dc8d56316 100644
--- a/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
+++ b/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
@@ -20,9 +20,9 @@ import com.android.dialer.binary.basecomponent.BaseDialerRootComponent;
import com.android.dialer.calllog.CallLogModule;
import com.android.dialer.common.concurrent.DialerExecutorModule;
import com.android.dialer.configprovider.SharedPrefConfigProviderModule;
+import com.android.dialer.duo.stub.StubDuoModule;
import com.android.dialer.enrichedcall.stub.StubEnrichedCallModule;
import com.android.dialer.inject.ContextModule;
-import com.android.dialer.lightbringer.stub.StubLightbringerModule;
import com.android.dialer.phonenumbergeoutil.impl.PhoneNumberGeoUtilModule;
import com.android.dialer.simulator.impl.SimulatorModule;
import com.android.dialer.storage.StorageModule;
@@ -52,7 +52,7 @@ import javax.inject.Singleton;
StubEnrichedCallModule.class,
MapsModule.class,
VoicemailModule.class,
- StubLightbringerModule.class
+ StubDuoModule.class
}
)
public interface GoogleStubDialerRootComponent extends BaseDialerRootComponent {}
diff --git a/java/com/android/dialer/calldetails/CallDetailsActivity.java b/java/com/android/dialer/calldetails/CallDetailsActivity.java
index d871fce12..3a3c9118a 100644
--- a/java/com/android/dialer/calldetails/CallDetailsActivity.java
+++ b/java/com/android/dialer/calldetails/CallDetailsActivity.java
@@ -42,11 +42,11 @@ import com.android.dialer.common.LogUtil;
import com.android.dialer.common.concurrent.AsyncTaskExecutors;
import com.android.dialer.constants.ActivityRequestCodes;
import com.android.dialer.dialercontact.DialerContact;
+import com.android.dialer.duo.Duo;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.enrichedcall.EnrichedCallComponent;
import com.android.dialer.enrichedcall.EnrichedCallManager.HistoricalDataChangedListener;
import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult;
-import com.android.dialer.lightbringer.Lightbringer;
-import com.android.dialer.lightbringer.LightbringerComponent;
import com.android.dialer.logging.DialerImpression;
import com.android.dialer.logging.Logger;
import com.android.dialer.logging.UiAction;
@@ -219,17 +219,16 @@ public class CallDetailsActivity extends AppCompatActivity
}
@Override
- public void placeLightbringerCall(String phoneNumber) {
+ public void placeDuoVideoCall(String phoneNumber) {
Logger.get(this).logImpression(DialerImpression.Type.CALL_DETAILS_LIGHTBRINGER_CALL_BACK);
- Lightbringer lightbringer = LightbringerComponent.get(this).getLightbringer();
- if (!lightbringer.isReachable(this, phoneNumber)) {
+ Duo duo = DuoComponent.get(this).getDuo();
+ if (!duo.isReachable(this, phoneNumber)) {
placeImsVideoCall(phoneNumber);
return;
}
try {
- startActivityForResult(
- lightbringer.getIntent(this, phoneNumber), ActivityRequestCodes.DIALTACTS_LIGHTBRINGER);
+ startActivityForResult(duo.getIntent(this, phoneNumber), ActivityRequestCodes.DIALTACTS_DUO);
} catch (ActivityNotFoundException e) {
Toast.makeText(this, R.string.activity_not_available, Toast.LENGTH_SHORT).show();
}
diff --git a/java/com/android/dialer/calldetails/CallDetailsAdapter.java b/java/com/android/dialer/calldetails/CallDetailsAdapter.java
index 1f00d9d9a..b39fa0fb3 100644
--- a/java/com/android/dialer/calldetails/CallDetailsAdapter.java
+++ b/java/com/android/dialer/calldetails/CallDetailsAdapter.java
@@ -29,7 +29,7 @@ import com.android.dialer.calllogutils.CallbackActionHelper;
import com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction;
import com.android.dialer.common.Assert;
import com.android.dialer.dialercontact.DialerContact;
-import com.android.dialer.lightbringer.LightbringerComponent;
+import com.android.dialer.duo.DuoComponent;
import java.util.List;
/** Adapter for RecyclerView in {@link CallDetailsActivity}. */
@@ -55,9 +55,7 @@ final class CallDetailsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
this.callDetailsEntries = callDetailsEntries;
this.callbackActionListener = callbackActionListener;
this.reportCallIdListener = reportCallIdListener;
- callTypeHelper =
- new CallTypeHelper(
- context.getResources(), LightbringerComponent.get(context).getLightbringer());
+ callTypeHelper = new CallTypeHelper(context.getResources(), DuoComponent.get(context).getDuo());
}
@Override
@@ -122,6 +120,6 @@ final class CallDetailsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
CallDetailsEntry entry = callDetailsEntries.get(0);
return CallbackActionHelper.getCallbackAction(
- contact.getNumber(), entry.getFeatures(), entry.getIsLightbringerCall());
+ contact.getNumber(), entry.getFeatures(), entry.getIsDuoCall());
}
}
diff --git a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
index 4e7b8c612..a713c55a4 100644
--- a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
+++ b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
@@ -92,7 +92,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder {
boolean isPulledCall =
(entry.getFeatures() & Calls.FEATURES_PULLED_EXTERNALLY)
== Calls.FEATURES_PULLED_EXTERNALLY;
- boolean isLightbringerCall = entry.getIsLightbringerCall();
+ boolean isDuoCall = entry.getIsDuoCall();
callTime.setTextColor(getColorForCallType(context, callType));
callTypeIcon.clear();
@@ -103,7 +103,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder {
MotorolaUtils.shouldShowWifiIconInCallLog(context, entry.getFeatures()));
callTypeText.setText(
- callTypeHelper.getCallTypeText(callType, isVideoCall, isPulledCall, isLightbringerCall));
+ callTypeHelper.getCallTypeText(callType, isVideoCall, isPulledCall, isDuoCall));
callTime.setText(CallLogDates.formatDate(context, entry.getDate()));
if (CallTypeHelper.isMissedCallType(callType)) {
diff --git a/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java
index 7c3892a33..1e08963ed 100644
--- a/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java
+++ b/java/com/android/dialer/calldetails/CallDetailsHeaderViewHolder.java
@@ -106,7 +106,7 @@ public class CallDetailsHeaderViewHolder extends RecyclerView.ViewHolder
private void setCallbackAction(@CallbackAction int callbackAction) {
this.callbackAction = callbackAction;
switch (callbackAction) {
- case CallbackAction.LIGHTBRINGER:
+ case CallbackAction.DUO:
case CallbackAction.IMS_VIDEO:
callbackButton.setVisibility(View.VISIBLE);
callbackButton.setImageResource(R.drawable.quantum_ic_videocam_vd_theme_24);
@@ -130,8 +130,8 @@ public class CallDetailsHeaderViewHolder extends RecyclerView.ViewHolder
case CallbackAction.IMS_VIDEO:
callbackActionListener.placeImsVideoCall(contact.getNumber());
break;
- case CallbackAction.LIGHTBRINGER:
- callbackActionListener.placeLightbringerCall(contact.getNumber());
+ case CallbackAction.DUO:
+ callbackActionListener.placeDuoVideoCall(contact.getNumber());
break;
case CallbackAction.VOICE:
callbackActionListener.placeVoiceCall(contact.getNumber(), contact.getPostDialDigits());
@@ -151,8 +151,8 @@ public class CallDetailsHeaderViewHolder extends RecyclerView.ViewHolder
/** Places an IMS video call. */
void placeImsVideoCall(String phoneNumber);
- /** Places a Lightbringer call. */
- void placeLightbringerCall(String phoneNumber);
+ /** Places a Duo video call. */
+ void placeDuoVideoCall(String phoneNumber);
/** Place a traditional voice call. */
void placeVoiceCall(String phoneNumber, String postDialDigits);
diff --git a/java/com/android/dialer/calldetails/proto/call_details_entries.proto b/java/com/android/dialer/calldetails/proto/call_details_entries.proto
index 587fd35bd..7a5700b1c 100644
--- a/java/com/android/dialer/calldetails/proto/call_details_entries.proto
+++ b/java/com/android/dialer/calldetails/proto/call_details_entries.proto
@@ -18,7 +18,7 @@ message CallDetailsEntries {
optional int64 duration = 5;
optional int64 data_usage = 6;
repeated enrichedcall.historyquery.proto.HistoryResult history_results = 7;
- optional bool is_lightbringer_call = 8;
+ optional bool is_duo_call = 8;
}
repeated CallDetailsEntry entries = 1;
diff --git a/java/com/android/dialer/calllogutils/CallTypeHelper.java b/java/com/android/dialer/calllogutils/CallTypeHelper.java
index 783f799f3..e3c711d99 100644
--- a/java/com/android/dialer/calllogutils/CallTypeHelper.java
+++ b/java/com/android/dialer/calllogutils/CallTypeHelper.java
@@ -18,7 +18,7 @@ package com.android.dialer.calllogutils;
import android.content.res.Resources;
import com.android.dialer.compat.AppCompatConstants;
-import com.android.dialer.lightbringer.Lightbringer;
+import com.android.dialer.duo.Duo;
/** Helper class to perform operations related to call types. */
public class CallTypeHelper {
@@ -51,12 +51,12 @@ public class CallTypeHelper {
private final CharSequence mBlockedName;
/** Name used to identify calls which were answered on another device. */
private final CharSequence mAnsweredElsewhereName;
- /** Name used to identify incoming lightbringer calls. */
- private final CharSequence mIncomingLightbringerCall;
- /** Name used to identify outgoing lightbringer calls. */
- private final CharSequence mOutgoingLightbringerCall;
+ /** Name used to identify incoming Duo calls. */
+ private final CharSequence mIncomingDuoCall;
+ /** Name used to identify outgoing Duo calls. */
+ private final CharSequence mOutgoingDuoCall;
- public CallTypeHelper(Resources resources, Lightbringer lightbringer) {
+ public CallTypeHelper(Resources resources, Duo duo) {
// Cache these values so that we do not need to look them up each time.
mIncomingName = resources.getString(R.string.type_incoming);
mIncomingPulledName = resources.getString(R.string.type_incoming_pulled);
@@ -73,16 +73,16 @@ public class CallTypeHelper {
mBlockedName = resources.getString(R.string.type_blocked);
mAnsweredElsewhereName = resources.getString(R.string.type_answered_elsewhere);
- if (lightbringer.getIncomingCallTypeText() != -1) {
- mIncomingLightbringerCall = resources.getString(lightbringer.getIncomingCallTypeText());
+ if (duo.getIncomingCallTypeText() != -1) {
+ mIncomingDuoCall = resources.getString(duo.getIncomingCallTypeText());
} else {
- mIncomingLightbringerCall = mIncomingVideoName;
+ mIncomingDuoCall = mIncomingVideoName;
}
- if (lightbringer.getOutgoingCallTypeText() != -1) {
- mOutgoingLightbringerCall = resources.getString(lightbringer.getOutgoingCallTypeText());
+ if (duo.getOutgoingCallTypeText() != -1) {
+ mOutgoingDuoCall = resources.getString(duo.getOutgoingCallTypeText());
} else {
- mOutgoingLightbringerCall = mOutgoingVideoName;
+ mOutgoingDuoCall = mOutgoingVideoName;
}
}
@@ -95,15 +95,15 @@ public class CallTypeHelper {
/** Returns the text used to represent the given call type. */
public CharSequence getCallTypeText(
- int callType, boolean isVideoCall, boolean isPulledCall, boolean isLightbringerCall) {
+ int callType, boolean isVideoCall, boolean isPulledCall, boolean isDuoCall) {
switch (callType) {
case AppCompatConstants.CALLS_INCOMING_TYPE:
if (isVideoCall) {
if (isPulledCall) {
return mIncomingVideoPulledName;
} else {
- if (isLightbringerCall) {
- return mIncomingLightbringerCall;
+ if (isDuoCall) {
+ return mIncomingDuoCall;
}
return mIncomingVideoName;
}
@@ -120,8 +120,8 @@ public class CallTypeHelper {
if (isPulledCall) {
return mOutgoingVideoPulledName;
} else {
- if (isLightbringerCall) {
- return mOutgoingLightbringerCall;
+ if (isDuoCall) {
+ return mOutgoingDuoCall;
}
return mOutgoingVideoName;
}
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()
diff --git a/java/com/android/dialer/constants/ActivityRequestCodes.java b/java/com/android/dialer/constants/ActivityRequestCodes.java
index da05eb76b..4fe3e298e 100644
--- a/java/com/android/dialer/constants/ActivityRequestCodes.java
+++ b/java/com/android/dialer/constants/ActivityRequestCodes.java
@@ -16,6 +16,8 @@
package com.android.dialer.constants;
+import com.android.dialer.duo.Duo;
+
/**
* Class containing {@link android.app.Activity#onActivityResult(int, int, android.content.Intent)}
* request codes.
@@ -30,11 +32,8 @@ public final class ActivityRequestCodes {
/** Request code for {@link com.android.dialer.callcomposer.CallComposerActivity} intent. */
public static final int DIALTACTS_CALL_COMPOSER = 2;
- /**
- * Request code for {@link
- * com.android.dialer.lightbringer.Lightbringer#getIntent(android.content.Context, String)}.
- */
- public static final int DIALTACTS_LIGHTBRINGER = 3;
+ /** Request code for {@link Duo#getIntent(android.content.Context, String)}. */
+ public static final int DIALTACTS_DUO = 3;
/** Request code for {@link com.android.dialer.calldetails.CallDetailsActivity} intent. */
public static final int DIALTACTS_CALL_DETAILS = 4;
diff --git a/java/com/android/dialer/lightbringer/Lightbringer.java b/java/com/android/dialer/duo/Duo.java
index 2318ef5fd..ec07ad4b4 100644
--- a/java/com/android/dialer/lightbringer/Lightbringer.java
+++ b/java/com/android/dialer/duo/Duo.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.dialer.lightbringer;
+package com.android.dialer.duo;
import android.content.ComponentName;
import android.content.Context;
@@ -29,7 +29,7 @@ import com.google.auto.value.AutoValue;
import com.google.common.base.Optional;
import java.util.List;
-public interface Lightbringer {
+public interface Duo {
boolean isEnabled();
@@ -50,10 +50,10 @@ public interface Lightbringer {
void requestUpgrade(@NonNull Context context, Call call);
@MainThread
- void registerListener(@NonNull LightbringerListener listener);
+ void registerListener(@NonNull DuoListener listener);
@MainThread
- void unregisterListener(@NonNull LightbringerListener listener);
+ void unregisterListener(@NonNull DuoListener listener);
@Nullable
@MainThread
@@ -86,7 +86,7 @@ public interface Lightbringer {
public static ReachabilityData create(
String number, boolean videoCallable, boolean supportsUpgrade) {
- return new AutoValue_Lightbringer_ReachabilityData(number, videoCallable, supportsUpgrade);
+ return new AutoValue_Duo_ReachabilityData(number, videoCallable, supportsUpgrade);
}
}
}
diff --git a/java/com/android/dialer/lightbringer/LightbringerComponent.java b/java/com/android/dialer/duo/DuoComponent.java
index 5bb342406..031ee9e53 100644
--- a/java/com/android/dialer/lightbringer/LightbringerComponent.java
+++ b/java/com/android/dialer/duo/DuoComponent.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.dialer.lightbringer;
+package com.android.dialer.duo;
import android.content.Context;
import android.support.annotation.NonNull;
@@ -24,18 +24,18 @@ import dagger.Subcomponent;
/**
*/
@Subcomponent
-public abstract class LightbringerComponent {
+public abstract class DuoComponent {
@NonNull
- public abstract Lightbringer getLightbringer();
+ public abstract Duo getDuo();
- public static LightbringerComponent get(Context context) {
+ public static DuoComponent get(Context context) {
return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component())
- .lightbringerComponent();
+ .duoComponent();
}
/** Used to refer to the root application component. */
public interface HasComponent {
- LightbringerComponent lightbringerComponent();
+ DuoComponent duoComponent();
}
}
diff --git a/java/com/android/dialer/lightbringer/LightbringerListener.java b/java/com/android/dialer/duo/DuoListener.java
index 90fffb349..9c660be9c 100644
--- a/java/com/android/dialer/lightbringer/LightbringerListener.java
+++ b/java/com/android/dialer/duo/DuoListener.java
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-package com.android.dialer.lightbringer;
+package com.android.dialer.duo;
-public interface LightbringerListener {
- void onLightbringerStateChanged();
+public interface DuoListener {
+ void onDuoStateChanged();
}
diff --git a/java/com/android/dialer/lightbringer/stub/LightbringerStub.java b/java/com/android/dialer/duo/stub/DuoStub.java
index e66739113..99f03adfd 100644
--- a/java/com/android/dialer/lightbringer/stub/LightbringerStub.java
+++ b/java/com/android/dialer/duo/stub/DuoStub.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.dialer.lightbringer.stub;
+package com.android.dialer.duo.stub;
import android.content.ComponentName;
import android.content.Context;
@@ -26,16 +26,16 @@ import android.support.annotation.StringRes;
import android.telecom.Call;
import android.telecom.PhoneAccountHandle;
import com.android.dialer.common.Assert;
-import com.android.dialer.lightbringer.Lightbringer;
-import com.android.dialer.lightbringer.LightbringerListener;
+import com.android.dialer.duo.Duo;
+import com.android.dialer.duo.DuoListener;
import com.google.common.base.Optional;
import java.util.List;
import javax.inject.Inject;
-public class LightbringerStub implements Lightbringer {
+public class DuoStub implements Duo {
@Inject
- public LightbringerStub() {}
+ public DuoStub() {}
@Override
public boolean isEnabled() {
@@ -83,14 +83,14 @@ public class LightbringerStub implements Lightbringer {
@MainThread
@Override
- public void registerListener(LightbringerListener listener) {
+ public void registerListener(DuoListener listener) {
Assert.isMainThread();
Assert.isNotNull(listener);
}
@MainThread
@Override
- public void unregisterListener(LightbringerListener listener) {
+ public void unregisterListener(DuoListener listener) {
Assert.isMainThread();
Assert.isNotNull(listener);
}
diff --git a/java/com/android/dialer/lightbringer/stub/StubLightbringerModule.java b/java/com/android/dialer/duo/stub/StubDuoModule.java
index e0be0a270..604406a94 100644
--- a/java/com/android/dialer/lightbringer/stub/StubLightbringerModule.java
+++ b/java/com/android/dialer/duo/stub/StubDuoModule.java
@@ -14,17 +14,17 @@
* limitations under the License.
*/
-package com.android.dialer.lightbringer.stub;
+package com.android.dialer.duo.stub;
-import com.android.dialer.lightbringer.Lightbringer;
+import com.android.dialer.duo.Duo;
import dagger.Binds;
import dagger.Module;
import javax.inject.Singleton;
@Module
-public abstract class StubLightbringerModule {
+public abstract class StubDuoModule {
@Binds
@Singleton
- public abstract Lightbringer bindsLightbringer(LightbringerStub lightbringer);
+ public abstract Duo bindsDuo(DuoStub duoStub);
}
diff --git a/java/com/android/dialer/searchfragment/cp2/SearchContactViewHolder.java b/java/com/android/dialer/searchfragment/cp2/SearchContactViewHolder.java
index 327fe5303..b162a5e52 100644
--- a/java/com/android/dialer/searchfragment/cp2/SearchContactViewHolder.java
+++ b/java/com/android/dialer/searchfragment/cp2/SearchContactViewHolder.java
@@ -34,11 +34,11 @@ import android.widget.TextView;
import com.android.dialer.common.Assert;
import com.android.dialer.contactphoto.ContactPhotoManager;
import com.android.dialer.dialercontact.DialerContact;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.enrichedcall.EnrichedCallCapabilities;
import com.android.dialer.enrichedcall.EnrichedCallComponent;
import com.android.dialer.enrichedcall.EnrichedCallManager;
import com.android.dialer.lettertile.LetterTileDrawable;
-import com.android.dialer.lightbringer.LightbringerComponent;
import com.android.dialer.searchfragment.common.Projections;
import com.android.dialer.searchfragment.common.QueryBoldingUtil;
import com.android.dialer.searchfragment.common.R;
@@ -194,7 +194,7 @@ public final class SearchContactViewHolder extends ViewHolder implements OnClick
return CallToAction.VIDEO_CALL;
}
- if (LightbringerComponent.get(context).getLightbringer().isReachable(context, number)) {
+ if (DuoComponent.get(context).getDuo().isReachable(context, number)) {
return CallToAction.DUO_CALL;
}
diff --git a/java/com/android/dialer/searchfragment/list/SearchAdapter.java b/java/com/android/dialer/searchfragment/list/SearchAdapter.java
index 1ca29e072..29e4e2320 100644
--- a/java/com/android/dialer/searchfragment/list/SearchAdapter.java
+++ b/java/com/android/dialer/searchfragment/list/SearchAdapter.java
@@ -35,7 +35,7 @@ import com.android.dialer.callintent.CallSpecificAppData;
import com.android.dialer.common.Assert;
import com.android.dialer.constants.ActivityRequestCodes;
import com.android.dialer.dialercontact.DialerContact;
-import com.android.dialer.lightbringer.LightbringerComponent;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.logging.DialerImpression;
import com.android.dialer.logging.Logger;
import com.android.dialer.searchfragment.common.RowClickListener;
@@ -244,9 +244,8 @@ public final class SearchAdapter extends RecyclerView.Adapter<ViewHolder>
public void placeDuoCall(String phoneNumber) {
Logger.get(activity)
.logImpression(DialerImpression.Type.LIGHTBRINGER_VIDEO_REQUESTED_FROM_SEARCH);
- Intent intent =
- LightbringerComponent.get(activity).getLightbringer().getIntent(activity, phoneNumber);
- activity.startActivityForResult(intent, ActivityRequestCodes.DIALTACTS_LIGHTBRINGER);
+ Intent intent = DuoComponent.get(activity).getDuo().getIntent(activity, phoneNumber);
+ activity.startActivityForResult(intent, ActivityRequestCodes.DIALTACTS_DUO);
}
@Override
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 47a4a70f5..d911a4c4f 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -51,6 +51,7 @@ import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
import com.android.dialer.compat.telephony.TelephonyManagerCompat;
import com.android.dialer.configprovider.ConfigProviderBindings;
+import com.android.dialer.duo.DuoComponent;
import com.android.dialer.enrichedcall.EnrichedCallCapabilities;
import com.android.dialer.enrichedcall.EnrichedCallComponent;
import com.android.dialer.enrichedcall.EnrichedCallManager;
@@ -58,7 +59,6 @@ import com.android.dialer.enrichedcall.EnrichedCallManager.CapabilitiesListener;
import com.android.dialer.enrichedcall.EnrichedCallManager.Filter;
import com.android.dialer.enrichedcall.EnrichedCallManager.StateChangedListener;
import com.android.dialer.enrichedcall.Session;
-import com.android.dialer.lightbringer.LightbringerComponent;
import com.android.dialer.location.GeoUtil;
import com.android.dialer.logging.ContactLookupResult;
import com.android.dialer.logging.ContactLookupResult.Type;
@@ -72,9 +72,9 @@ import com.android.incallui.latencyreport.LatencyReport;
import com.android.incallui.util.TelecomCallUtil;
import com.android.incallui.videotech.VideoTech;
import com.android.incallui.videotech.VideoTech.VideoTechListener;
+import com.android.incallui.videotech.duo.DuoVideoTech;
import com.android.incallui.videotech.empty.EmptyVideoTech;
import com.android.incallui.videotech.ims.ImsVideoTech;
-import com.android.incallui.videotech.lightbringer.LightbringerTech;
import com.android.incallui.videotech.utils.VideoUtils;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -1614,11 +1614,8 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
}
videoTechs.add(
- new LightbringerTech(
- LightbringerComponent.get(call.mContext).getLightbringer(),
- call,
- call.mTelecomCall,
- phoneNumber));
+ new DuoVideoTech(
+ DuoComponent.get(call.mContext).getDuo(), call, call.mTelecomCall, phoneNumber));
}
VideoTech getVideoTech() {
diff --git a/java/com/android/incallui/videotech/lightbringer/LightbringerTech.java b/java/com/android/incallui/videotech/duo/DuoVideoTech.java
index eb2e92e85..c858ae1f2 100644
--- a/java/com/android/incallui/videotech/lightbringer/LightbringerTech.java
+++ b/java/com/android/incallui/videotech/duo/DuoVideoTech.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.incallui.videotech.lightbringer;
+package com.android.incallui.videotech.duo;
import android.content.Context;
import android.support.annotation.NonNull;
@@ -23,8 +23,8 @@ import android.telecom.Call;
import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
import com.android.dialer.configprovider.ConfigProviderBindings;
-import com.android.dialer.lightbringer.Lightbringer;
-import com.android.dialer.lightbringer.LightbringerListener;
+import com.android.dialer.duo.Duo;
+import com.android.dialer.duo.DuoListener;
import com.android.dialer.logging.DialerImpression;
import com.android.incallui.video.protocol.VideoCallScreen;
import com.android.incallui.video.protocol.VideoCallScreenDelegate;
@@ -33,50 +33,50 @@ import com.android.incallui.videotech.utils.SessionModificationState;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
-public class LightbringerTech implements VideoTech, LightbringerListener {
- private final Lightbringer lightbringer;
+public class DuoVideoTech implements VideoTech, DuoListener {
+ private final Duo duo;
private final VideoTechListener listener;
private final Call call;
private final String callingNumber;
private int callState = Call.STATE_NEW;
private boolean isRemoteUpgradeAvailabilityQueried;
- public LightbringerTech(
- @NonNull Lightbringer lightbringer,
+ public DuoVideoTech(
+ @NonNull Duo duo,
@NonNull VideoTechListener listener,
@NonNull Call call,
@NonNull String callingNumber) {
- this.lightbringer = Assert.isNotNull(lightbringer);
+ this.duo = Assert.isNotNull(duo);
this.listener = Assert.isNotNull(listener);
this.call = Assert.isNotNull(call);
this.callingNumber = Assert.isNotNull(callingNumber);
- lightbringer.registerListener(this);
+ duo.registerListener(this);
}
@Override
public boolean isAvailable(Context context) {
if (!ConfigProviderBindings.get(context)
.getBoolean("enable_lightbringer_video_upgrade", true)) {
- LogUtil.v("LightbringerTech.isAvailable", "upgrade disabled by flag");
+ LogUtil.v("DuoVideoTech.isAvailable", "upgrade disabled by flag");
return false;
}
if (callState != Call.STATE_ACTIVE) {
- LogUtil.v("LightbringerTech.isAvailable", "upgrade unavailable, call must be active");
+ LogUtil.v("DuoVideoTech.isAvailable", "upgrade unavailable, call must be active");
return false;
}
- Optional<Boolean> localResult = lightbringer.supportsUpgrade(context, callingNumber);
+ Optional<Boolean> localResult = duo.supportsUpgrade(context, callingNumber);
if (localResult.isPresent()) {
LogUtil.v(
- "LightbringerTech.isAvailable", "upgrade supported in local cache: " + localResult.get());
+ "DuoVideoTech.isAvailable", "upgrade supported in local cache: " + localResult.get());
return localResult.get();
}
if (!isRemoteUpgradeAvailabilityQueried) {
- LogUtil.v("LightbringerTech.isAvailable", "reachability unknown, starting remote query");
+ LogUtil.v("DuoVideoTech.isAvailable", "reachability unknown, starting remote query");
isRemoteUpgradeAvailabilityQueried = true;
- lightbringer.updateReachability(context, ImmutableList.of(callingNumber));
+ duo.updateReachability(context, ImmutableList.of(callingNumber));
}
return false;
@@ -111,7 +111,7 @@ public class LightbringerTech implements VideoTech, LightbringerListener {
@Override
public void onCallStateChanged(Context context, int newState) {
if (newState == Call.STATE_DISCONNECTING) {
- lightbringer.unregisterListener(this);
+ duo.unregisterListener(this);
}
callState = newState;
@@ -119,7 +119,7 @@ public class LightbringerTech implements VideoTech, LightbringerListener {
@Override
public void onRemovedFromCallList() {
- lightbringer.unregisterListener(this);
+ duo.unregisterListener(this);
}
@Override
@@ -130,7 +130,7 @@ public class LightbringerTech implements VideoTech, LightbringerListener {
@Override
public void upgradeToVideo(@NonNull Context context) {
listener.onImpressionLoggingNeeded(DialerImpression.Type.LIGHTBRINGER_UPGRADE_REQUESTED);
- lightbringer.requestUpgrade(context, call);
+ duo.requestUpgrade(context, call);
}
@Override
@@ -184,7 +184,7 @@ public class LightbringerTech implements VideoTech, LightbringerListener {
public void setDeviceOrientation(int rotation) {}
@Override
- public void onLightbringerStateChanged() {
+ public void onDuoStateChanged() {
listener.onVideoTechStateChanged();
}