Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1006)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java

Issue 1419533002: Roll android_tools deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed setImageResource(0) crash Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698