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
This commit is contained in:
Beverly
2021-10-11 15:33:08 -04:00
committed by Beverly Tai
parent 7cf13cf4d8
commit 0142b7345f

View File

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