From 98e08ee93384aff9db60bbce046660907897208d Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Wed, 14 Jul 2021 14:18:12 -0400 Subject: [PATCH] PIN unlock buttons - contrast issue When the dark theme is adjusted, the correct color was not being reloaded. Without this fix, the back/enter buttons would not be discernible. Fixes: 193043693 Test: manual (toggle dark theme) Change-Id: Ie41549c6b7d8f49be62ce0fb8e7e3b7399784c44 --- .../src/com/android/keyguard/NumPadButton.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/NumPadButton.java b/packages/SystemUI/src/com/android/keyguard/NumPadButton.java index 099e6f4b5341e..57407f1f34c0b 100644 --- a/packages/SystemUI/src/com/android/keyguard/NumPadButton.java +++ b/packages/SystemUI/src/com/android/keyguard/NumPadButton.java @@ -88,13 +88,10 @@ public class NumPadButton extends AlphaOptimizedImageButton { * Reload colors from resources. **/ public void reloadColors() { - if (mAnimator != null) { - mAnimator.reloadColors(getContext()); - } else { - // Needed for old style pin - int textColor = Utils.getColorAttr(getContext(), android.R.attr.textColorPrimary) - .getDefaultColor(); - ((VectorDrawable) getDrawable()).setTintList(ColorStateList.valueOf(textColor)); - } + if (mAnimator != null) mAnimator.reloadColors(getContext()); + + int textColor = Utils.getColorAttrDefaultColor(getContext(), + android.R.attr.colorBackground); + ((VectorDrawable) getDrawable()).setTintList(ColorStateList.valueOf(textColor)); } }