From e12f924c45d9e40dbdd23ad01b7bde855b82c4c8 Mon Sep 17 00:00:00 2001 From: roldenburg Date: Tue, 19 Dec 2017 13:33:45 -0800 Subject: Add flags for the Duo install, activate and invite buttons Bug: 70034799 Test: GoogleCallLogAdapterTest PiperOrigin-RevId: 179596742 Change-Id: Ic5616af0680e36786ae5261813eae71cf096b084 --- .../app/calllog/CallLogListItemViewHolder.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'java/com/android/dialer/app/calllog') diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java index 2baf117dc..15c4b5850 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java @@ -691,15 +691,25 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder videoCallButtonView.setTag(IntentProvider.getDuoVideoIntentProvider(number)); videoCallButtonView.setVisibility(View.VISIBLE); } else if (duo.isActivated(mContext) && !identifiedSpamCall) { - inviteVideoButtonView.setTag(IntentProvider.getDuoInviteIntentProvider(number)); - inviteVideoButtonView.setVisibility(View.VISIBLE); + if (ConfigProviderBindings.get(mContext) + .getBoolean("enable_call_log_duo_invite_button", false)) { + inviteVideoButtonView.setTag(IntentProvider.getDuoInviteIntentProvider(number)); + inviteVideoButtonView.setVisibility(View.VISIBLE); + } } else if (duo.isEnabled(mContext) && !identifiedSpamCall) { if (!duo.isInstalled(mContext)) { - setUpVideoButtonView.setTag(IntentProvider.getInstallDuoIntentProvider()); + if (ConfigProviderBindings.get(mContext) + .getBoolean("enable_call_log_install_duo_button", false)) { + setUpVideoButtonView.setTag(IntentProvider.getInstallDuoIntentProvider()); + setUpVideoButtonView.setVisibility(View.VISIBLE); + } } else { - setUpVideoButtonView.setTag(IntentProvider.getSetUpDuoIntentProvider()); + if (ConfigProviderBindings.get(mContext) + .getBoolean("enable_call_log_activate_duo_button", false)) { + setUpVideoButtonView.setTag(IntentProvider.getSetUpDuoIntentProvider()); + setUpVideoButtonView.setVisibility(View.VISIBLE); + } } - setUpVideoButtonView.setVisibility(View.VISIBLE); } break; default: -- cgit v1.2.3