Fixed
Status Update
Comments
cu...@google.com <cu...@google.com>
ap...@google.com <ap...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
cu...@google.com <cu...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a44bc71d502aeb298c1b0a24c8c2373423bafcb9
Author: Curtis Belmonte <curtislb@google.com>
Date: Thu Sep 03 17:29:09 2020
Use exact model names for biometric prompt delay
The previous solution to delay showing the biometric prompt on some
devices incorrectly matched some unaffected devices based on model
prefix. This change addresses the problem by restricting the solution to
exact model string matches.
Test: BiometricPrompt sample app from b/157783075 on API 29-30.
Test: Biometric integration test app on API 27-30.
Test: ./gradlew biometric:biometric:test
Test: ./gradlew biometric:biometric:connectedAndroidTest
Test: ./gradlew biometric:integration-tests:testapp:connectedAndroidTest
Bug: 157783075
Change-Id: Icdf953d9b34c296769f15f51007cdab5d43b5124
M biometric/biometric/src/androidTest/java/androidx/biometric/DeviceUtilsTest.java
M biometric/biometric/src/main/java/androidx/biometric/DeviceUtils.java
M biometric/biometric/src/main/res/values/devices.xml
https://android-review.googlesource.com/1419735
Branch: androidx-master-dev
commit a44bc71d502aeb298c1b0a24c8c2373423bafcb9
Author: Curtis Belmonte <curtislb@google.com>
Date: Thu Sep 03 17:29:09 2020
Use exact model names for biometric prompt delay
The previous solution to delay showing the biometric prompt on some
devices incorrectly matched some unaffected devices based on model
prefix. This change addresses the problem by restricting the solution to
exact model string matches.
Test: BiometricPrompt sample app from
Test: Biometric integration test app on API 27-30.
Test: ./gradlew biometric:biometric:test
Test: ./gradlew biometric:biometric:connectedAndroidTest
Test: ./gradlew biometric:integration-tests:testapp:connectedAndroidTest
Bug: 157783075
Change-Id: Icdf953d9b34c296769f15f51007cdab5d43b5124
M biometric/biometric/src/androidTest/java/androidx/biometric/DeviceUtilsTest.java
M biometric/biometric/src/main/java/androidx/biometric/DeviceUtils.java
M biometric/biometric/src/main/res/values/devices.xml
Description
If you show 2
BiometricPrompt
s back-to-back on a Pixel 4 (which uses face unlock), the second prompt will be immediately dismissed. This does not happen on devices that use fingerprint, like a Pixel 2.I've attached a sample project that reproduces the issue. You can configure the delay between the first prompt being dismissed and the second being shown - with a delay of 400ms the issue reliably reproduces, and with a delay of 600ms it does not.
Here's a video of the sample on a Pixel 4:https://i.imgur.com/4sCWOm0.mp4
Here's a video of the sample on a Pixel 2:https://i.imgur.com/5dDI4zO.mp4
I believe it's caused by this , which has a 500ms delay for face unlock and runs after the second prompt has been shown when 2 are shown back-to-back.
postDelayed
Note that this is a bug in the framework, not in the androidx.biometric library, but there doesn't seems to be a relevant component for framework biometrics (and it should be possible to work around this in androidx).
BUILD INFO:
STEPS TO REPRODUCE:
EXPECTED RESULTS: Both prompts work correctly.
OBSERVED RESULTS: The second prompt is immediately dismissed.
NUMBER OF TIMES YOU WERE ABLE TO REPRODUCE: 3/3