From ec166e56e20a0e6662911ecaa894c6c8fdc0c6a7 Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Wed, 1 Jul 2020 19:43:55 +0800 Subject: [PATCH] fingerprint: inscreen: enable FOD in TSP in initialization Samsung enables FOD in TS driver (fod_enable) at all times except a small number of optical FOD sensor that doesn't have BiometricFeature .FEATURE_SUPPORT_AOD. As optical type sensor support is not implemented currently, this HAL is only used on device that has FOD always-on. This change follows behavior of stock firmware and without toggling of FOD enable state FOD should be more stable. Plus it allows setInteractive and config_powerDecoupleInteractiveModeFromDisplay to function properly with FOD. Currently setInteractive(0) happens before a onShowFODView (which is the current point to call fod_enable) can be triggered by the Doze, as TS driver only handles command when it is enabled, FOD doesn't work when there is a setInteractive(0) that disables TS. Change-Id: I22291cc62d81ffdaa5edd3f684f9788b0c0650c2 --- hidl/fingerprint/inscreen/FingerprintInscreen.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp index d41f9c9d..1664ee91 100644 --- a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp +++ b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp @@ -78,6 +78,7 @@ FingerprintInscreen::FingerprintInscreen() { #ifdef FOD_SET_RECT set(TSP_CMD_PATH, FOD_SET_RECT); #endif + set(TSP_CMD_PATH, FOD_ENABLE); } Return FingerprintInscreen::onStartEnroll() { return Void(); } @@ -88,15 +89,9 @@ Return FingerprintInscreen::onPress() { return Void(); } Return FingerprintInscreen::onRelease() { return Void(); } -Return FingerprintInscreen::onShowFODView() { - set(TSP_CMD_PATH, FOD_ENABLE); - return Void(); -} +Return FingerprintInscreen::onShowFODView() { return Void(); } -Return FingerprintInscreen::onHideFODView() { - set(TSP_CMD_PATH, FOD_DISABLE); - return Void(); -} +Return FingerprintInscreen::onHideFODView() { return Void(); } Return FingerprintInscreen::handleAcquired(int32_t acquiredInfo, int32_t vendorCode) { std::lock_guard _lock(mCallbackLock);