From 0f41dc08bcb24bf3b03d25669ee5e43f60198926 Mon Sep 17 00:00:00 2001 From: linyuh Date: Wed, 4 Apr 2018 09:18:14 -0700 Subject: Explicitly hide the badge in ContactPhotoView when it shouldn't be shown. Bug: 70988682 Test: ContactPhotoViewTest PiperOrigin-RevId: 191600243 Change-Id: I60f979241898f1799a57c2401cbddb8975a9caa7 --- java/com/android/dialer/widget/ContactPhotoView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/com/android/dialer/widget/ContactPhotoView.java b/java/com/android/dialer/widget/ContactPhotoView.java index 6fcc89ab0..5020875dc 100644 --- a/java/com/android/dialer/widget/ContactPhotoView.java +++ b/java/com/android/dialer/widget/ContactPhotoView.java @@ -86,12 +86,15 @@ public final class ContactPhotoView extends FrameLayout { private void setBadge(PhotoInfo photoInfo) { // No badge for spam numbers. if (photoInfo.getIsSpam()) { + hideBadge(); return; } if (photoInfo.getIsVideo()) { contactBadgeContainer.setVisibility(View.VISIBLE); videoCallBadge.setVisibility(View.VISIBLE); + } else { + hideBadge(); } } } -- cgit v1.2.3