Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ff0c50c2 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Add UdfpsTouchOverlayViewModels

Introduce UdfpsTouchOverlayViewModels and bind
the appropriate ViewModel to the UdfpsTouchOverlay
depending on who requested UDFPS.

For DeviceEntry, SysUI continues to requests UDFPS even
when isn't desirable to show the UI and allow UDFPS to be accepted.
This is to avoid frequent IPCs on the lockscreen, so the experience is
smooth & quick. For example, users can't use UDFPS when the camera app
is occluding the lockscreen; however, once the user navigates out of the
camera app (back) or taps on an affordance that requires authentication,
SysUI should immediately show the UI for UDFPS and allow authentication
without any delay.

Therefore, instead of stopping fingerprint listening
when an occluded app is on the keyguard, device entry relies on the
DeviceEntryUdfpsTouchOverlayViewModel to block touches on the
UdfpsTouchOverlay from being sent to FingerprintManager and relies on
the DeviceEntryIconViewModel to stop visually showing the device entry
(UDFPS) icon when UDFPS shouldn't be allowed.

For non-device entry cases, SysUI is not responsible for the visual UI;
however, SysUI is still responsible for forwarding UDFPS touches to the
FingerprintManager. In these cases, DefaultUdfpsTouchOverlayViewModel is
used to determine whether SysUI is in a state where it should send
UDFPS touches to the FingerprintManager. Currently, SysUI won't send
these touches if the shade is partially or fully expanded OR if there's
a sysui dialog requesting to hide affordances on the display.

This CL also updates a lot of TestDependencies to easily add a test for
DeviceEntryUdfpsTouchOverlayViewModel.

Bug: 305234447
Flag: ACONFIG com.android.systemui.device_entry_udfps_refactor DEVELOPMENT
Test: atest UdfpsControllerTest UdfpsControllerOverlayTest
Test: atest DefaultUdfpsTouchOverlayViewModelTest DeviceEntryUdfpsTouchOverlayViewModelTest
Change-Id: I4d9b22e9eb241f534640deea5a3bc99f2b854d9e
parent 3fc09fe3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment