From 590000b9ed674e9244d7561f10b214f6b343cb66 Mon Sep 17 00:00:00 2001 From: roldenburg Date: Thu, 22 Jun 2017 13:43:59 -0700 Subject: Only show video call option in the call log when appropriate This fixes two bugs we previously had: 1) If video calling was disabled in Settings, we would still show a video call option in the call log (fixed by checking the setting) 2) If a different app from Dialer inserted a video call into the history, we would incorrectly show a video call button in the call log (fixed by checking the account handle matches the default phone account) PiperOrigin-RevId: 159870114 Change-Id: I19ef6b50db50f9961a486f48996427a1da8f8813 --- .../com/android/dialer/calldetails/CallDetailsEntryViewHolder.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java') diff --git a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java index 41c85215d..6ad158e8c 100644 --- a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java +++ b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java @@ -36,7 +36,6 @@ import com.android.dialer.compat.AppCompatConstants; import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult; import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult.Type; import com.android.dialer.oem.MotorolaUtils; -import com.android.dialer.util.CallUtil; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; @@ -88,9 +87,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder { CallTypeHelper callTypeHelper, boolean showMultimediaDivider) { int callType = entry.getCallType(); - boolean isVideoCall = - (entry.getFeatures() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO - && CallUtil.isVideoEnabled(context); + boolean isVideoCall = (entry.getFeatures() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO; boolean isPulledCall = (entry.getFeatures() & Calls.FEATURES_PULLED_EXTERNALLY) == Calls.FEATURES_PULLED_EXTERNALLY; @@ -98,7 +95,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder { callTime.setTextColor(getColorForCallType(context, callType)); callTypeIcon.clear(); callTypeIcon.add(callType); - callTypeIcon.setShowVideo((entry.getFeatures() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO); + callTypeIcon.setShowVideo(isVideoCall); callTypeIcon.setShowHd(MotorolaUtils.shouldShowHdIconInCallLog(context, entry.getFeatures())); callTypeIcon.setShowWifi( MotorolaUtils.shouldShowWifiIconInCallLog(context, entry.getFeatures())); -- cgit v1.2.3