From 957fa5965166f58c2fb175d2abdae9d6c6b8d120 Mon Sep 17 00:00:00 2001 From: Beverly Date: Tue, 28 Mar 2023 19:07:30 +0000 Subject: [PATCH] Directly update the udfps icon background color Previously we were retrieving a new drawable resource everytime we wanted to update the color, but this was not updating the displayed color. Fixes: 275232960 Test: manual Change-Id: I42ebb35f483e96e9f92483e9f2bdfae160ebe95a --- .../com/android/systemui/biometrics/UdfpsKeyguardView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java index ee9081c7027d0..178cda46cddab 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java @@ -24,6 +24,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.content.Context; +import android.content.res.ColorStateList; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.Rect; @@ -176,7 +177,9 @@ public class UdfpsKeyguardView extends UdfpsAnimationView { mTextColorPrimary = Utils.getColorAttrDefaultColor(mContext, android.R.attr.textColorPrimary); - mBgProtection.setImageDrawable(getContext().getDrawable(R.drawable.fingerprint_bg)); + final int backgroundColor = Utils.getColorAttrDefaultColor(getContext(), + com.android.internal.R.attr.colorSurface); + mBgProtection.setImageTintList(ColorStateList.valueOf(backgroundColor)); mLockScreenFp.invalidate(); // updated with a valueCallback }