Commit Graph

4 Commits

Author SHA1 Message Date
jabashque
6caecd4826 fingerprint: set dimlayer_hbm on finger up/down instead of auth/cancel
When dimlayer_hbm is enabled, HWC ends up disabling all color
transformations, including Night Light. Since we enable/disable
dimlayer_hbm on authenticate/cancel, this means that whenever the UDFPS
circle is present, Night Light ends up temporarily turning off. This is
especially not helpful on the lock screen, where the UDFPS circle is
active all the time.

Instead of turning on dimlayer_hbm during the entire time that the UDFPS
circle is showing, let's turn on dimlayer_hbm only when the user is
pressing down on the circle. In doing so, the color transformations will
be disabled for only when the user is touching the circle. We will still
disable dimlayer_hbm on cancel anyway, just in case that wasn't already
set to off by the time cancel() is called.

However, when enrolling a new fingerprint, the user is going to be
tapping on the UDFPS circle many, many times, and the user may prefer to
just keep dimlayer on for the entire duration. Add `isEnrolling` to
track that, and don't change dimlayer state while that is set to true.

Change-Id: I9ed1a6b5839e39b8f70ff4af4ebe8d1bc66ffb98
Signed-off-by: AnierinB <anierin@evolution-x.org>
2023-04-17 16:12:49 +00:00
jabashque
dfba74a283 fingerprint: Reset dimlayer HBM + fp press state on error
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 `setDimlayerHbm(0)` and `setFpPress(0)` when
handling FINGERPRINT_ERROR messages.

Change-Id: Ic2754249083c30a9b3b150b825357d894814fe84
2022-06-10 20:44:28 +02:00
LuK1337
c9225a7db6 fingerprint: Setup dimming & fp press notifications
Change-Id: I0b1df953f11974daf1adb4b88d9b48efd229bcf1
2022-04-19 20:53:23 +02:00
LuK1337
7f4f347c2c hidl: fingerprint: Initial AOSP -> Oplus wrapper
Change-Id: I8729b3920dd52c18416179d4118a4d012fb5b1d3
2022-04-18 22:56:40 +02:00