Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java |
index df87a09926dabf3895d2d38413d570e6cbe6a871..49b02da41f1fe27ed841a4a81e63f8a93ed7da23 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java |
@@ -367,9 +367,14 @@ public class CustomTabToolbar extends ToolbarLayout implements LocationBar, |
if (securityLevel == ConnectionSecurityLevel.NONE) { |
mAnimDelegate.hideSecurityButton(); |
} else { |
+ int id = LocationBarLayout.getSecurityIconResource( |
+ securityLevel, !shouldEmphasizeHttpsScheme()); |
// ImageView#setImageResource is no-op if given resource is the current one. |
- mSecurityButton.setImageResource(LocationBarLayout.getSecurityIconResource( |
- securityLevel, !shouldEmphasizeHttpsScheme())); |
+ if (id == 0) { |
+ mSecurityButton.setImageDrawable(null); |
+ } else { |
+ mSecurityButton.setImageResource(id); |
+ } |
mAnimDelegate.showSecurityButton(); |
} |
mUrlBar.emphasizeUrl(); |