fingerprint: inscreen: enable sensor on ShowFODView
authorJesse Chan <jc@lineageos.org>
Fri, 8 May 2020 16:08:23 +0000 (00:08 +0800)
committerJan Altensen <info@stricted.net>
Sat, 16 May 2020 15:41:10 +0000 (17:41 +0200)
commit4c9e74f53b0279f3d9bf2549d5bb102f2604794b
tree282807ac55fc0589a7e30d14cee3ea069b7116d9
parentb8a230d4d0a234c80530722bf5b85dce17b281a7
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>
hidl/fingerprint/inscreen/FingerprintInscreen.cpp