Mutate UDFPS FingerprintDrawable

The drawable is loaded from a resource, which by default shares
state across all instances. Mutate it so that enroll, BP,
FPM, Keyguard, etc have their own unique state.

Bug: 178438459
Test: Enter settings, enter enrollment, exit enrollment
Change-Id: I41ef6965d11f89e7c0ee93fd38453a91ef0b4766
This commit is contained in:
Kevin Chyn
2021-03-01 17:27:35 -08:00
parent f52e94c0cf
commit 115defdc9f

View File

@@ -40,6 +40,7 @@ public abstract class UdfpsAnimation extends Drawable {
public UdfpsAnimation(@NonNull Context context) {
mContext = context;
mFingerprintDrawable = context.getResources().getDrawable(R.drawable.ic_fingerprint, null);
mFingerprintDrawable.mutate();
}
public void onSensorRectUpdated(@NonNull RectF sensorRect) {