summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjabashque <jabashque@gmail.com>2022-05-18 22:22:23 -0700
committerSemavi Ulusoy <doc.divxm@gmail.com>2022-05-19 23:34:53 +0300
commit190e6dd646661ffd4ab074be057792cd1a7830e3 (patch)
tree443fc0e0d7cf65697d9ca4e47eb59c3e386a678b
parentbbd01133b06b71eedd3fb910876ca3f1cd9a9ea5 (diff)
hidl: fingerprint: call onFingerUp() on errorHEADs12.1
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 `onFingerUp()` when handling FINGERPRINT_ERROR messages. `onFingerUp()` also sets `isCancelled` to 0, but we likely do not want that to happen for FINGERPRINT_ERROR messages, so move that line over to `onFingerDown()` instead. Change-Id: Ic2754249083c30a9b3b150b825357d894814fe84
-rw-r--r--hidl/fingerprint/BiometricsFingerprint.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/hidl/fingerprint/BiometricsFingerprint.cpp b/hidl/fingerprint/BiometricsFingerprint.cpp
index ad87e8e..636dd51 100644
--- a/hidl/fingerprint/BiometricsFingerprint.cpp
+++ b/hidl/fingerprint/BiometricsFingerprint.cpp
@@ -96,6 +96,7 @@ Return<bool> BiometricsFingerprint::isUdfps(uint32_t) {
}
Return<void> BiometricsFingerprint::onFingerDown(uint32_t, uint32_t, float, float) {
+ this->isCancelled = 0;
mVendorDisplayService->setMode(OP_DISPLAY_SET_DIM, 1); // Fixme! workaround for in-app fod auth
mVendorDisplayService->setMode(OP_DISPLAY_NOTIFY_PRESS, 1);
@@ -103,7 +104,6 @@ Return<void> BiometricsFingerprint::onFingerDown(uint32_t, uint32_t, float, floa
}
Return<void> BiometricsFingerprint::onFingerUp() {
- this->isCancelled = 0;
mVendorDisplayService->setMode(OP_DISPLAY_NOTIFY_PRESS, 0);
return Void();
@@ -351,6 +351,7 @@ void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
if (!thisPtr->mClientCallback->onError(devId, result, vendorCode).isOk()) {
ALOGE("failed to invoke fingerprint onError callback");
}
+ getInstance()->onFingerUp();
}
break;
case FINGERPRINT_ACQUIRED: {