Ensure we always show "Call" for Duo call entries
Previously we were showing Video call as the button in an expanded Duo call log
entry. This is a problem since the primary icon is to start a Duo video call,
there is no way to place a phone call without this fix.
Before: https://drive.google.com/a/google.com/file/d/0B7uuA4cyYX0xa2o2c2c2U2Y5T1E/view?usp=sharing
After: https://drive.google.com/a/google.com/file/d/0B7uuA4cyYX0xM0JqY3JWbHZLdjg/view?usp=sharing
Bug: 64693073
Test: GoogleCallLogAdapterTest
PiperOrigin-RevId: 165247078
Change-Id: If77a14ad717f39e3db2bc58e25e754286f671638
diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
index 5549039..d2b6bcc 100644
--- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
+++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
@@ -609,13 +609,15 @@
callButtonView.setVisibility(View.VISIBLE);
}
- if (CallUtil.isVideoEnabled(mContext)
+ // We need to check if we are showing the Lightbringer primary button. If we are, then we should
+ // show the "Call" button here regardless of IMS availability.
+ if (showLightbringerPrimaryButton()) {
+ callButtonView.setVisibility(View.VISIBLE);
+ videoCallButtonView.setVisibility(View.GONE);
+ } else if (CallUtil.isVideoEnabled(mContext)
&& (hasPlacedCarrierVideoCall() || canSupportCarrierVideoCall())) {
videoCallButtonView.setTag(IntentProvider.getReturnVideoCallIntentProvider(number));
videoCallButtonView.setVisibility(View.VISIBLE);
- } else if (showLightbringerPrimaryButton()) {
- callButtonView.setVisibility(View.VISIBLE);
- videoCallButtonView.setVisibility(View.GONE);
} else if (lightbringerReady) {
videoCallButtonView.setTag(IntentProvider.getLightbringerIntentProvider(number));
videoCallButtonView.setVisibility(View.VISIBLE);