summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Chan <jc@lineageos.org>2020-05-09 00:08:23 +0800
committerJan Altensen <info@stricted.net>2020-05-16 17:41:10 +0200
commit4c9e74f53b0279f3d9bf2549d5bb102f2604794b (patch)
tree282807ac55fc0589a7e30d14cee3ea069b7116d9
parentb8a230d4d0a234c80530722bf5b85dce17b281a7 (diff)
downloadandroid_hardware_samsung-4c9e74f53b0279f3d9bf2549d5bb102f2604794b.tar.gz
android_hardware_samsung-4c9e74f53b0279f3d9bf2549d5bb102f2604794b.tar.bz2
android_hardware_samsung-4c9e74f53b0279f3d9bf2549d5bb102f2604794b.zip
fingerprint: inscreen: enable sensor on ShowFODView
Enabling sensor on Press is slow and frequent on/off switching on Press/Release leads to unexpected results. Looking into Kernel, the purpose of FOD_ENABLE/FOD_DISABLE commands are to save battery. (ts->lowpower_mode) It is not meant to handle fingerprint authentication on Press/Release. It is expected that FOD is in ENABLED state whenever the user is EXPECTED to use fingerprint authentication soon. Thus, this patch moved FOD_ENABLE/FOD_DISABLE from OnPress/onRelease to onShowFODView/onHideFODView so the fingerprint authentication can be faster and the logic makes more sense. Change-Id: Id94b71acd55038d6eda7a1a89dde5fdf5a1e298f Signed-off-by: Jesse Chan <jc@lineageos.org>
-rw-r--r--hidl/fingerprint/inscreen/FingerprintInscreen.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp
index 47211b1..1b1f313 100644
--- a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp
+++ b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp
@@ -80,18 +80,15 @@ Return<void> FingerprintInscreen::onStartEnroll() { return Void(); }
Return<void> FingerprintInscreen::onFinishEnroll() { return Void(); }
-Return<void> FingerprintInscreen::onPress() {
- set(TSP_CMD_PATH, FOD_ENABLE);
- return Void();
-}
+Return<void> FingerprintInscreen::onPress() { return Void(); }
-Return<void> FingerprintInscreen::onRelease() {
- set(TSP_CMD_PATH, FOD_DISABLE);
+Return<void> FingerprintInscreen::onRelease() { return Void(); }
+
+Return<void> FingerprintInscreen::onShowFODView() {
+ set(TSP_CMD_PATH, FOD_ENABLE);
return Void();
}
-Return<void> FingerprintInscreen::onShowFODView() { return Void(); }
-
Return<void> FingerprintInscreen::onHideFODView() {
set(TSP_CMD_PATH, FOD_DISABLE);
return Void();