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>
tirimbino
Jesse Chan 5 years ago committed by Jan Altensen
parent b8a230d4d0
commit 4c9e74f53b
  1. 13
      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();

Loading…
Cancel
Save