Merge "PIN unlock buttons - contrast issue" into sc-dev am: 4bdb302f09

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15286561

Change-Id: Icea4edb04402a7ad0ce8bcbd9449fb946019f757
This commit is contained in:
Matt Pietal
2021-07-15 01:03:14 +00:00
committed by Automerger Merge Worker

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