Skip to content
Commit 1c042ba4 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

linkToDeath on BiometricPrompt#authenticate

It's possible that the client dies. Currently the AuthSession doesn't
know about this, so it doesn't do the following. This CL adds them.

1) Close the SysUI dialog
2) Clean up any existing state with individual sensors

Test: atest com.android.server.biometrics
Test: 1) Use a face unlock device
      2) BiometricPromptDemo, start authentication
      3) Wait for auth to time out (try again button gets shown)
      4) Kill the calling app, e.g.
         `adb shell killall com.example.android.biometric`
      5) Start another activity to trigger task stack change, e.g.
         `adb shell am start -a ...`
      6) Start another authentication, e.g.
         `adb shell am start -a android.app.action.CONFIRM_DEVICE_CREDENTIAL`
      7) Authenticate, reject, or wait for timeout
Test: Repeat the above, but kill the app when the sensor is active
      (before auth times out in step 3)

Before: Upon step 6, no authentication UI is shown. Upon 7, SysUI would
        crash.

After: Upon step 6, a new authentication UI is shown. Upon 7, no crash
       observed, and auth behaves as expected.

Bug: 156719497

Change-Id: Ib573466edac7dd95a8c031e0533cbca693b806f6
Merged-In: Ib573466edac7dd95a8c031e0533cbca693b806f6
parent eb84f960
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