Merge "Refactor UDFPS display logic and remove illumination" into tm-qpr-dev am: 1ecaa4d68e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19949884 Change-Id: Ib162b02b868f3befdf8336295c2535ecfeec0ba4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -315,17 +315,17 @@ public interface BiometricFingerprintConstants {
|
||||
int FINGERPRINT_ACQUIRED_VENDOR_BASE = 1000;
|
||||
|
||||
/**
|
||||
* Whether the FingerprintAcquired message is a signal to turn off HBM
|
||||
* Whether the FingerprintAcquired message is a signal to disable the UDFPS display mode.
|
||||
* We want to disable the UDFPS mode as soon as possible to conserve power and provide better
|
||||
* UX. For example, prolonged high-brightness illumination of optical sensors can be unpleasant
|
||||
* to the user, can cause long term display burn-in, and can drain the battery faster.
|
||||
*/
|
||||
static boolean shouldTurnOffHbm(@FingerprintAcquired int acquiredInfo) {
|
||||
static boolean shouldDisableUdfpsDisplayMode(@FingerprintAcquired int acquiredInfo) {
|
||||
switch (acquiredInfo) {
|
||||
case FINGERPRINT_ACQUIRED_START:
|
||||
// Authentication just began
|
||||
// Keep the UDFPS mode because the authentication just began.
|
||||
return false;
|
||||
case FINGERPRINT_ACQUIRED_GOOD:
|
||||
// Good image captured. Turn off HBM. Success/Reject comes after, which is when
|
||||
// hideUdfpsOverlay will be called.
|
||||
return true;
|
||||
case FINGERPRINT_ACQUIRED_PARTIAL:
|
||||
case FINGERPRINT_ACQUIRED_INSUFFICIENT:
|
||||
case FINGERPRINT_ACQUIRED_IMAGER_DIRTY:
|
||||
@@ -334,11 +334,12 @@ public interface BiometricFingerprintConstants {
|
||||
case FINGERPRINT_ACQUIRED_IMMOBILE:
|
||||
case FINGERPRINT_ACQUIRED_TOO_BRIGHT:
|
||||
case FINGERPRINT_ACQUIRED_VENDOR:
|
||||
// Bad image captured. Turn off HBM. Matcher will not run, so there's no need to
|
||||
// keep HBM on.
|
||||
// Disable the UDFPS mode because the image capture has finished. The overlay
|
||||
// can be hidden later, once the authentication result arrives.
|
||||
return true;
|
||||
case FINGERPRINT_ACQUIRED_UNKNOWN:
|
||||
default:
|
||||
// Keep the UDFPS mode in case of an unknown message.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user