diff options
| author | 2020-06-22 09:06:41 -0400 | |
|---|---|---|
| committer | 2020-06-22 09:06:41 -0400 | |
| commit | d0ab4bec4ff3d51a447cac609c1700ed8dfa1eb8 (patch) | |
| tree | 36f636ed91e96e785ec5c6f71564a0b20bba5405 | |
| parent | ace942e57bf8b5bc9504c03daf5cdabcadbb8daf (diff) | |
Controls UI - Fix icon tint for custom icons
ImageView has state that cannot be reversed regarding tintList, even
if you set it to null. Therefore only clear the tint if we absolutely
need to in order to avoid an override.
Bug: 159559045
Test: manual
Change-Id: Id2223136a76f7e7e3118d95f1ad126f768199d3f
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt index 865a38a2076c..0e4f68431c16 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt @@ -413,7 +413,9 @@ class ControlViewHolder( control?.getCustomIcon()?.let { // do not tint custom icons, assume the intended icon color is correct - icon.imageTintList = null + if (icon.imageTintList != null) { + icon.imageTintList = null + } icon.setImageIcon(it) } ?: run { if (drawable is StateListDrawable) { |