commit | a33dc03fc65b5d33b94380b4f0ab879a887c480c | [log] [tgz] |
---|---|---|
author | Sinan Sahin <sinansahin@google.com> | Fri Apr 19 20:11:08 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Apr 19 20:11:08 2019 |
tree | 464e9cde8a8ffd5147a3c4b8103996ec5b65b4ed | |
parent | ac6308130d561190357c37d2e16ba35f6f60533f [diff] |
Fix permission dialog icon color by calling #mutate() This CL fixes a bug where a tinted drawable would preserve its tint when the same drawable is used in a different dialog. This is fixed by making the drawable mutable. Bug: 954127 Change-Id: I66578ffc409d0e160d238b62680676a322bd8e3c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574251 Reviewed-by: Theresa <twellington@chromium.org> Commit-Queue: Sinan Sahin <sinansahin@google.com> Cr-Commit-Position: refs/heads/master@{#652619}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/TextViewWithCompoundDrawables.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/TextViewWithCompoundDrawables.java index 7f6c97c3..df70389d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/widget/TextViewWithCompoundDrawables.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/TextViewWithCompoundDrawables.java
@@ -89,6 +89,7 @@ for (Drawable drawable : drawables) { if (drawable == null) continue; + drawable.mutate(); drawable.setColorFilter( mDrawableTint.getColorForState(getDrawableState(), 0), PorterDuff.Mode.SRC_IN); }