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
This commit is contained in:
Matt Pietal
2021-07-14 14:18:12 -04:00
parent 0c36db22b4
commit 98e08ee933

View File

@@ -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));
}
}