diff options
author | roldenburg <roldenburg@google.com> | 2017-06-22 13:43:59 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-06-22 14:43:23 -0700 |
commit | 590000b9ed674e9244d7561f10b214f6b343cb66 (patch) | |
tree | 5ef7370fb052d15594cae2b43568439f476e5f28 /java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java | |
parent | d1dfa05d59357b9818a8223c91b739cb6169075d (diff) |
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
Diffstat (limited to 'java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java')
-rw-r--r-- | java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java | 7 |
1 files changed, 2 insertions, 5 deletions
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())); |