From dfba74a2830c5e35530abd05dd3501cd1f0053b0 Mon Sep 17 00:00:00 2001 From: jabashque Date: Wed, 18 May 2022 22:22:23 -0700 Subject: [PATCH] fingerprint: Reset dimlayer HBM + fp press state on error The way the fingerprint service handles FINGERPRINT_ERROR messages allows for situations where the user can end up turning off the screen while notify_fppress is set to 1. This results in situations where the screen backlight does not turn on at all when turning on the panel, which is not an ideal user experience. Fix this by calling `setDimlayerHbm(0)` and `setFpPress(0)` when handling FINGERPRINT_ERROR messages. Change-Id: Ic2754249083c30a9b3b150b825357d894814fe84 --- hidl/fingerprint/BiometricsFingerprint.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hidl/fingerprint/BiometricsFingerprint.cpp b/hidl/fingerprint/BiometricsFingerprint.cpp index de0632d..2055a25 100644 --- a/hidl/fingerprint/BiometricsFingerprint.cpp +++ b/hidl/fingerprint/BiometricsFingerprint.cpp @@ -116,6 +116,8 @@ Return BiometricsFingerprint::onAuthenticated(uint64_t deviceId, uint32_t Return BiometricsFingerprint::onError(uint64_t deviceId, FingerprintError error, int32_t vendorCode) { + setDimlayerHbm(0); + setFpPress(0); return mClientCallback->onError(deviceId, error, vendorCode); }