Previously, we show settings's udfps enroll animation view (the fingerprint icon and progress view) once the FingerprintEnrollEnrolling is shown.
However, touch events have to wait for systemui's udfps overlay to be valid. This CL lets settings's udfps enroll view wait for systemui's overlay.
1. Sets udfps enroll animation view's default visibility Gone.
2. Propagates FingerprintManager#onUdfpsOverlayShown to
FingerprintEnrollEnrolling and when it's called, set the enroll view
visible.
Besides, this CL renames onPointerDown() and onPointerUp() with Udfps.
Bug: 280718879
Test: atest FingerprintEnrollEnrollingTest
Change-Id: Ieed3e74c182828918785edcacb021f19a3665f2a
This CL fixes four bugs for SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS feature:
1. When the udfps view is big enough (i.e. landscape mode on panther), the progress bar's bottom is clipped by the footer button.
- Sets the footer button width WRAP_CONTENT and removes the space view to make the footer button short enough, not hiding the udfps view progress bar.
2. When both text size and display icon size are big enough on the portrait mode, the udfps view's position is wrong because its parent views are longer than the screen and scrollable.
- Add addOnDrawListener() on udfps view's parent view, whenever it's changed, recalculate the margins of udfps view to make sure it's aligned with the sensor's position.
3. When the finger is down on the screen and the lighting circle on the sensor is shown, the fingerprint icon is not hidden.
- Propagates FingerprintManager#onPointerDown and #onPointerUp to UdfpsEnrollView and hide/show fingerprint drawable accordingly.
4. When rotating the screen, fingerprint location is not right because UdfpsEnrollHelper is recreated.
- Makes UdfpsEnrollHelper a fragment and call setRetainInstance(true) to keep it even though the configuration is changed.
Test: manually tested on device:
Turn this flag on via adb command
adb shell setprop
sys.fflag.override.settings_show_udfps_enroll_in_settings true
Bug: 260617060
Change-Id: I15ffde6455cab7e9d4a394349ec39e72df5b2911
The added files in this CL are mostly copied from SystemUI. Enabling the flag SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS with this CL, the udfps enrollment icons and progress bar are shown in settings.
Turn this flag on via adb:
adb shell setprop sys.fflag.override.settings_show_udfps_enroll_in_settings true
There are some known issues that will be fixed in the following CLs, including:
- When the finger is down on the screen and the lighting circle on the sensor is shown, the fingerprint icon is not hidden.
- When rotating the screen, fingerprint location is not right.
- Currently the scale factor is hard coded for pixel 7 pro, we should update the scale factor based on the device, etc.
Test: manually tested on device
Bug: 260617060
Change-Id: I5aede070eb1de9eb3b5e1400d6e51a8523079852
Bug: 110589286
Test: fingerprint enrolling still works
Test: enrollment flow with and without a pin set up still works properly
Test: enrollment continues when configuration changes, stops otherwise
Change-Id: I39f76c7f1a16e9533cef573f87cf4b81cb20cb18