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
Loading
Please register or sign in to comment