summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix settings activity showing background bp whenHao Dong2025-07-081-0/+5
| | | | | | | | | | | | | | | | | | | | createConfirmDeviceCredentialIntent() API is used. If the app uses createConfirmDeviceCredentialIntent(), ConfirmDeviceCredentialActivity is the top activity which has "settings" as package name. Then if the app switches to settings, since previous foreground check only checks package name, biometric prompt isn't cancelled. This CL adds a class name check for this case. Flag: EXEMPT bugfix Bug: 339532378 Test: manual test with sample app on emulator Test: atest BiometricActivityTests#testConfirmDeviceCredentialActivityDismiss_whenSwitchToSettings (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b363da50d853018536fae5d214340a9bd7f2639b) Merged-In: I722e285cd15869799b9fadd2324014cf3c6d44ad Change-Id: I722e285cd15869799b9fadd2324014cf3c6d44ad Change-Id: Ib6b6d28effd418667121ec821576e2799b9dd969
* Merge tag 'android-13.0.0_r35' of ↵George Zacharia2023-04-031-75/+43
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 release 35 Change-Id: I709958b2f015d1774b2ece25894467c3a279f93c
| * Add support for Predictive Back in AuthCredentialPasswordViewomarmt2022-11-181-7/+8
| | | | | | | | | | | | | | Test: atest AuthContainerViewTest Bug: 254450850 Change-Id: I3d71d3f595eba16b2e1cab01d915dd7842717a6e Merged-In: I3d71d3f595eba16b2e1cab01d915dd7842717a6e
| * Fix biometric prompt disappeared by itself after rotate 180 degreesVincent Wang2022-11-041-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | "onConfigurationChanged" won't be triggered when device rotate from landscape to landscape or portrait to portrait. We need to skip onWindowFocusChanged(false) in above cases to avoid BP closed. Bug: b/246683265 Test: 1. Show BP in landscape 2. Rotate device with 180 degree 3. atest AuthContainerViewTest#testFocusLossAfterRotating Change-Id: I398e52e5cb749d64a3953b6718df08c36498a02d
| * Merge "Request hiding IME before starting dismiss biometric UI animation" ↵Ming-Shin Lu2022-11-021-0/+6
| |\ | | | | | | | | | into tm-qpr-dev
| | * Request hiding IME before starting dismiss biometric UI animationMing-Shin Lu2022-10-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As recents animation will invoke hideSoftInputFromWindow when the Biometric UI lost focus during quick-switch. Since IME hiding animation will be scheduled on the focus app's UI thread, so if Biometric UI has running the animation on UI thread, the IME hiding animation will be delayed until the animation finish. Make sure calling WindowInsetsController#hide(ime()) before starting dismiss biometric UI to fix this issue. Fix: 247705580 Test: manual by issue steps: 1. Unlock the device 2. Go to Settings -> Network and internet -> Hotspot and tethering -> WIFI hotspot 3. Enable use Wi-Fi hotspot 4. Tap on Biometric to show keyboard 5. From password screen go to home screen 6. Expect keyboard will be hidden without being delayed Test: atest AuthContainerViewTest#\ testDismissesOnFocusLoss_hidesKeyboardWhenVisible Merged-In: I541f41832753ea1f4f48f6c4745649606b37d207 Change-Id: I541f41832753ea1f4f48f6c4745649606b37d207
| * | [DO NOT MERGE]Fix AuthCredentialPatternView#onErrorTimeoutFinish() buglbill2022-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When user auth fail on pattern view many times, the pattern view would be locked and disabled and wait for 30s timeout. Once timeout finish invoke, re-enabled pattern view is necessary. 2. Add AuthCredentialViewTest.java to extend PIN/Password/Pattern unit test coverage. Bug: 243699695 Test: atest com.android.systemui.biometrics.AuthCredentialViewTest Test: manual setup Pattern lock, try to wrong auth many times device locked for 30s patter view disabled once timeout, re-enabled pattern view Change-Id: I2fd26f6310e31e130d52a7c34a02a3ddf02b9166
| * | Merge "Improve the first frame latency of BP showing" into tm-qpr-devVincent Wang2022-10-251-54/+5
| |\ \
| | * | Improve the first frame latency of BP showingVincent Wang2022-10-171-54/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the times of build layers, draw layers and flush layers Bug: b/249295628 Test: 1. Atest AuthContainerViewTest 2. Check Prompt show/dismiss animation Change-Id: I6c6ac1d9115dd8610dc3e9555a208c372e341a9e (cherry picked from commit eb1b3a43ce268b8e0b456fb491af7abed9115008)
| * | | Fix UDFPS icon of Biometric Prompt has no response after rotationVincent Wang2022-10-201-1/+15
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If configurationChanged occurs when playing BP showing animation, onDialogAnimatedIn() might not be executed. It causes that BiometricService doesn't get the notify from SysUI. To avoid this problem, check the status of BP, if BP is still playing intro animation, cancel the animation & force executed onDialogAnimatedIn() before closing old BP. Bug: b/249698846 Test: 1. Enroll fingerprints & enable auto rotate 2. Play Store logged in user account 3. Open "Play Store" and tap "Add another account" 4. Rotate the DUT from portrait to landscape before the end of BP showing animation Change-Id: Id8d7601cc98d0071d53b36e93962bb800c9bf3bd
| * | Merge "Fix 3rd-party app Biometric Prompt has no response after rotation" ↵Vincent Wang2022-10-121-1/+1
| |\ \ | | | | | | | | | | | | into tm-qpr-dev
| | * | Fix 3rd-party app Biometric Prompt has no response after rotationVincent Wang2022-10-051-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two AuthContainerView instances during rotating. The old one should be removed via WindowManger.removeView(). However it may be not removed so quickly, so the old one has the chance to receive onWindowFocusChanged(false) and notify BiometricService to cancel. So replace removeView() with removeViewInmediate(). Bug: b/250830611 Test: 1. Enroll at least 1 finger 2. Download WeBull from PlayStore 3. Register an account for WeBull 4. Enable biometric authentication in WeBull 5. Lauch WeBull & wait for BP showing 6. Rotate device & check the result Change-Id: I03548f0051254cd9df8d4733dfe24d4650b7ab39
| * / Allow AuthContainerView to appear over lock screen.Bryce Lee2022-09-281-0/+1
| |/ | | | | | | | | | | | | | | | | This change adds the window flag to enable the associated window to show over the lockscreen. Test: atest AuthContainerViewTest#testLayoutParams_hasShowWhenLockedFlag Fixes: 249366032 Change-Id: Id04414b007037eab210f7b80107fefd3b8c4dbce
* | Merge tag 'android-13.0.0_r16' into t13.0George Zacharia2022-12-151-17/+93
|\| | | | | | | | | | | | | | | | | | | | | Android 13.0.0 Release 16 (TQ1A.221205.011) Also included the following reverts: 1. Revert "fw/b: Import Wi-Fi standard icon [1/2]" 2. Revert "Add preference for toggling the wallpaper zooming animation" Co-authored-by: Semavi Ulusoy <doc.divxm@gmail.com> Change-Id: I9a6b51e452c28d10411712c59778bb54da5783e9
| * Migrate AuthContainerView to predictive backShan Huang2022-09-121-2/+18
| | | | | | | | | | | | | | Bug: 238358031 Test: atest AuthContainerViewTest Change-Id: Ib64e078c00296c5b6306ba5178f417ce1d32f496
| * Fix NPEs in AuthContainerViewIlya Matyukhin2022-08-311-9/+33
| | | | | | | | | | | | Bug: 243493226 Test: N/A Change-Id: Ia3a677302ec3a270d421f44e746c12a701eb41a6
| * Fix The pop-up security lock will disappear after rotateVincent Wang2022-08-251-0/+21
| | | | | | | | | | | | | | | | | | Don't close BP when getting first onWindowFocusChanged(false) if device orientation changed. BUG: 236330327 Test: Reference b/236330327 Change-Id: Idc1e618e1549edf7a578dce52f4962f346f3d69d
| * Merge "Fix BiometricPrompt cannot detect when press the notification in LS" ↵Vincent Wang2022-07-151-5/+6
| |\ | | | | | | | | | into tm-qpr-dev
| | * Fix BiometricPrompt cannot detect when press the notification in LSVincent Wang2022-07-131-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In bug 236934379, when AuthContainerView with requestID x closed, the requestID of IBiometricSysuiReceiver already became to x+1, we should skip to notify wrong receiver to avoid biometric state abnormal. Bug: 236934379 Test: 1. Reference b/236934379 2. Check biometric prompt work normally 3. "atest AuthContainerViewTest" pass 4. "atest AuthControllerTest" pass Change-Id: I5c6c669dc81d7d032ec3a53462b110e1e542055a
| * | Set FLAG_DIM_BEHIND for Bidics Prompt windowlbill2022-07-061-1/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Biometric prompt used to set a background color biometric_dialog_dim_color for dim effect, however the dim background did not cover the statusbar and navigationbar regions. Use window manager approach for dim effect: - Set FLAG_DIM_BEHIND for window layout params - Set 0.5f dimAmount - Transit dimAmount when animate away Test: atest SystemUITests Test: atest com.android.systemui.biometrics.AuthContainerViewTest Test: enroll FPS, long press wifi hotsopt QS tile, then tap "Share" affordance with the QR code icon to bring up the biometric prompt Bug: 237047065 Change-Id: Icbb68406357a000a61752bd03d9337acf0eb6276
* | Merge tag 'android-13.0.0_r11' into t13.0Semavi Ulusoy2022-10-161-2/+109
|\| | | | | | | | | | | Android 13.0.0 release 11 Change-Id: If8bf0398b32bb4f4c13eead164dbb4fa01bc9c03
| * Dismiss BiometricPrompt if window focus is lostIlya Matyukhin2022-06-141-1/+10
| | | | | | | | | | | | | | Bug: 233820283 Bug: 216743197 Test: atest AuthContainerViewTest Change-Id: I73a87a364a752154e0f96c018b5e5ee8eb505c03
| * Merge "Add dump info for biometrics auth dialog" into tm-d1-devTreeHugger Robot2022-06-021-0/+33
| |\
| | * Add dump info for biometrics auth dialogMilton Wu2022-05-311-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add dump info under AuthController for dumpsys command adb shell dumpsys activity service com.android.systemui Bug: 232723342 Test: atest AuthContainerViewTest AuthControllerTest Change-Id: I4fdeaf0c47f4e3bb6ca381b7c295dddcce8900a9
| * | Merge "Update fingerprint icon layout size" into tm-d1-devTreeHugger Robot2022-05-261-0/+2
| |\ \
| | * | Update fingerprint icon layout sizeMilton Wu2022-05-261-0/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fingerprint icon height and width in LayoutParams are not sync with its measuredHeight and measuredWidth which are set inside UdfpsDialogMeasureAdapter, and it causes a icon truncat issue after requestLayout() is triggered. Bug: 232744799 Test: Trigger a fail UDFPS on app, and make sure icon not truncate Test: atest AuthBiometricFingerprintViewTest AuthContainerViewTest \ UdfpsDialogMeasureAdapterTest Change-Id: I9e6cce1fa242967164cf07140d7256ebe891cc46
| * / Instrument CUJ_BIOMETRIC_PROMPT with InteractionJankMonitorlbill2022-05-231-2/+65
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Monitor below animations - AuthContainerView transit in : SHOW - AuthContainerView transit out : DISMISS - AuthCredentialView transit in : SHOW - AuthCredentialView transit out: DISMISS - AuthBiometricView transit(Biometric <-> PIN/Password/Pattern): TRANSIT (Only add jankListener when not null) If view do not attached to window, skip tracing. Bug: 232176881 Test: atest SystemUITests Test: make and get perfetto trace Change-Id: I17fb2b5e00005c611efe2342abc30196ae4ccc31
| * Correctly scale down UDFPS offset for diff displayJoshua McCloskey2022-05-121-0/+9
| | | | | | | | | | | | | | | | Test: Verified manually that UDFPS pointer is in the correct location after scaling. Fixes: 231158953 Change-Id: I8359e885cb4872ab8d43209352c6645018c4597c
* | udfps: Change window type to TYPE_DISPLAY_OVERLAYTheScarastic2022-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | * TYPE_KEYGUARD_DIALOG was below volume and navbar and would have caused cause issues when HBM was enabled * BiometricPrompt uses different layer which again is below navbar and causes bright volume and navbar Change-Id: Ia37930ffd7a28fc8785f26ada3b69a02df0d4891
* | Dismiss BiometricPrompt if window focus is lostIlya Matyukhin2022-06-141-1/+10
|/ | | | | | | | Bug: 233820283 Bug: 216743197 Test: atest AuthContainerViewTest Change-Id: I76becb6c51fad300a04c4b0a0309c3124909588f Merged-In: I73a87a364a752154e0f96c018b5e5ee8eb505c03
* Move device management resource retrieval calls to bg threadkholoud mohamed2022-04-111-3/+10
| | | | | | | | Fixes: 217176608 Test: added Assert.isNotMainThread and manually verified it doesn't crash Change-Id: I506123117567128fc4cb0a712d6c8c0ff683d20f
* Prevent multiple calls to handleOnDialogAnimatedIn.Joe Bolinger2022-04-021-2/+14
| | | | | | | | | This also adds the request id to the methods that hide the prompt to prevent stale requests from being handled. I wasn't able to reproduce the bug locally but it appears to be caused by these stale events. Fix: 225275518 Bug: 213899762 Test: atest BiometricServiceTest AuthContainerViewTest Change-Id: Iac414763dd0012e51b331abe649a50e353df5e1c
* Add Face and Fingerprint (Co-Ex) support to biometric prompt.Joe Bolinger2022-02-281-2/+15
| | | | | | | | | Migrate simple views to Kotlin & remove useless test. Will add new tests in a follow up change. Bug: 217393533 Test: atest com.android.systemui.biometrics com.android.server.biometrics CommandQueueTest Test: manual (via BP test app) Change-Id: Ic8c80344d75f34f4b5f65ef14b61bbb5cddb0349
* Remove face to fingerprint multi-sensor behavior.Joe Bolinger2022-02-281-222/+99
| | | | | | | | | | | | Refactor existing tests to remove unnecessary mocks and boilerplate code to cover more of the real behavior. This is prep for adding new tests in another change to add the new face and fingerprint behavior. Bug: 217393533 Test: atest AuthBiometricViewTest AuthContainerViewTest Test: manual (authenticate using test app) Change-Id: If984d1c07fee98d2d7a20cb0025ad434ad9977f4
* Remove duplicated UDFPS view into single fingerprint view.Joe Bolinger2022-02-281-11/+7
| | | | | | Bug: 217393533 Test: manual (using BP test app) Change-Id: I9969bf26f119b2e0b267f9363f6084f8316040b1
* More low-hanging Dependency#get calls.Dave Mankoff2022-01-251-6/+8
| | | | | | Bug: 138786270 Test: manual Change-Id: I147dbf27bfdaa2e4f78ac18e8dbf2713da0fdd73
* Add requestId to authentication entry points.Joe Bolinger2021-09-011-0/+7
| | | | | | | | | | | | | | | | | The CancellationSignal passed into the authentication methods is not associated with the request and can be used to cancel the current operation, even if it is more recent. The new id prevents outdated signals from being using. Note that there are still issues with the Callbacks that are not addressed (see bug for details). Bug: 194405579 Bug: 189451155 Bug: 191716671 Test: atest com.android.systemui.biometrics com.android.server.biometrics Change-Id: Id71be912cc88ae90df8087eb8f1a6fc3e110f883
* Add a device orientation listener for updaing UDFPS layouts.Joe Bolinger2021-07-021-1/+11
| | | | | | | | Configuration change events are only generated when switching to/from portrait/landscape modes and can't be used for udfps overlays. Fix: 190832486 Test: manual (put device in landscape, start auth, flip 180 degrees) Change-Id: If03d8ee3ec479b91eab93622a6e93f00b3f14765
* Add modality switch callback to update UDFPS layout during configuration ↵Joe Bolinger2021-07-021-16/+23
| | | | | | | | | | | | changes. Addresses a race condition when the view is attached and the modality switch is in progress. Also fixes an issue with the confirmation button being re-enabled after a configuration change. Bug: 190832486 Test: atest AuthBiometricFaceToFingerprintViewTest Change-Id: I701d9d6f03474df2dda6f48e506208ddf7eab2c3
* Fix BiometricPrompt layout for UDFPS in landscapeCurtis Belmonte2021-07-011-25/+53
| | | | | | | | | | | | | | Makes some fixes to the logic for BiometricPrompt so that it better supports UDFPS in landscape: 1. Fix measurement used for UDFPS icon placement in landscape 2. Move prompt to correct position when falling back to UDFPS 3. Properly save/restore state for the face -> fingerprint prompt Test: atest com.android.systemui.biometrics Test: Manually tested face and/or fingerprint auth w/ device rotation Fixes: 190832486 Change-Id: Iac32e97f870998d9815817c348e23cfd9d020215
* Initalize view immediatly after construction to ensure all errors are processed.Joe Bolinger2021-06-111-7/+11
| | | | | | Fix: 190832013 Test: manual Change-Id: I2ec603d74933712444daedb95efe9b44e741e5e0
* Fix feedback and animations for face to fingerprint fallback authentication.Joe Bolinger2021-06-031-6/+7
| | | | | | Bug: 189164072 Test: atest com.android.systemui.biometrics com.android.server.biometrics Change-Id: I7fe8085dc4a4994c591bb4be20309ffb46bb06e9
* Merge "Remove unused code." into sc-devJoe Bolinger2021-06-011-5/+0
|\
| * Remove unused code.Joe Bolinger2021-06-011-5/+0
| | | | | | | | | | | | Bug: 187344988 Test: manual build Change-Id: I168dae159eae21b6fc608bd015144b1505d826be
* | Prevent talkback from annoucing the "System UI" container when ↵Joe Bolinger2021-06-011-6/+5
|/ | | | | | | | | BiometricPrompt is activated. Fix: 187344988 Test: manual (talkback with integration test app annouces title) Change-Id: I6ca61a61a5db0137115872cad57e374f0b31a1c5
* Delay starting fingerprint sensor when using multi-sensor devices.Joe Bolinger2021-05-201-15/+40
| | | | | | | | | | Fix: 183951321 Test: atest com.android.server.biometrics Test: atest com.android.systemui.biometrics Test: manual with integration app Change-Id: Ib1e92278d695b0ce5b6f799f51007262ade31f05
* Fix BiometricPrompt for face + non-UDFPS fingerprintCurtis Belmonte2021-04-211-7/+7
| | | | | | | | | | | | Currently, the dual-sensor config for BiometricPrompt requires a face sensor and under-display fingerprint sensor. This commit loosens the restriction to also accept non-UDFPS fingerprint sensors. The fallback logic in this case is the same as for face + UDFPS. Test: Manually verified that BiometricPrompt no longer crashes Fixes: 185301549 Change-Id: I8d90e8e10ae64adb29f7d3c7ce51004aa7a6f1b8
* Move ActivityLaunchAnimator in its own lib. (1/n)Jordan Demeulenaere2021-04-081-1/+1
| | | | | | Bug: 184121838 Test: Manual Change-Id: Ib979fed2f59d9dbf5f0696edb5fcb4956600e6e0
* Animate away instead of suddenly disappearingKevin Chyn2021-04-031-1/+1
| | | | | | | | | In certain cases, such as when callers cancel authentication, we are not animating away nicely. This fixes it. Bug: 152240892 Test: atest android.server.biometrics.BiometricSimpleTests#testBiometricCancellation Change-Id: I7e23de1453856afa2aec877792f8bdb76475d592
* Improve BiometricPrompt support for face + UDFPSCurtis Belmonte2021-04-011-2/+53
| | | | | | | | | | | | | | | On devices with an available face and UDFPS sensor, show a BiometricPrompt that first attempts to authenticate with face, falling back to UDFPS if unsuccessful. This change is UI-only for now, and follow-up work will be needed to coordinate fallback behavior between sensors, rather than running both simultaneously. Test: atest com.android.systemui.biometrics Test: Manually tested BiometricPrompt on device Bug: 172376593 Bug: 183220060 Change-Id: Ia128e97d2d831d14420ec015f32eaa589b8c38cd