Directly update the lock 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: 253643507
Test: manual
Change-Id: I6e2e0c2cfd02dbefb74f00ff8c168fdc9b60dc78
This commit is contained in:
Beverly
2023-01-26 14:54:17 +00:00
parent b2cc391aac
commit 2a15981dd8
2 changed files with 4 additions and 2 deletions

View File

@@ -136,7 +136,7 @@
android:id="@+id/lock_icon_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/fingerprint_bg"
android:src="@drawable/fingerprint_bg"
android:visibility="invisible"/>
<ImageView

View File

@@ -88,7 +88,9 @@ public class LockIconView extends FrameLayout implements Dumpable {
Utils.getColorAttrDefaultColor(getContext(), android.R.attr.textColorPrimary),
Color.WHITE,
mDozeAmount);
mBgView.setBackground(getContext().getDrawable(R.drawable.fingerprint_bg));
int backgroundColor = Utils.getColorAttrDefaultColor(getContext(),
com.android.internal.R.attr.colorSurface);
mBgView.setImageTintList(ColorStateList.valueOf(backgroundColor));
mBgView.setAlpha(1f - mDozeAmount);
mBgView.setVisibility(View.VISIBLE);
} else {