From 0142b7345fe6aa82189e3cf8ae2dbdb8756a0513 Mon Sep 17 00:00:00 2001 From: Beverly Date: Mon, 11 Oct 2021 15:33:08 -0400 Subject: [PATCH] Add log when upfps overlay isn't in sync with KeyguardUpdateMonitor Log a debug msg when UdfpsController hides the udfps overlay when KeyguardUpdateMonitor thinks that fingerprint is running. If we get to this log, we expect a KeyguardUpdateMonitor fingerprintRunningState update to 0 shortly afterwards. If not, there's a discrepancy between UdfpsController and KeyguardUpdateMonitor which can lead to a bad state. For example: the udfps icon not showing, but KeyguardUpdateMonitor thinks that it's showing so UDFPS will not be re-requested. Test: manual Fixes: 197167446 Change-Id: I4cc97ae0fcc2f11a320fdcd014fbcf14227a011c --- .../com/android/systemui/biometrics/UdfpsController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java index 594a642f33bbe..b2eaa2b8a8211 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java @@ -256,6 +256,13 @@ public class UdfpsController implements DozeReceiver { @Override public void hideUdfpsOverlay(int sensorId) { mFgExecutor.execute(() -> { + if (mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) { + // if we get here, we expect keyguardUpdateMonitor's fingerprintRunningState + // to be updated shortly afterwards + Log.d(TAG, "hiding udfps overlay when " + + "mKeyguardUpdateMonitor.isFingerprintDetectionRunning()=true"); + } + mServerRequest = null; updateOverlay(); });