Merge "Immediately trigger face-auth on udfps bouncer" into sc-dev
This commit is contained in:
@@ -2199,7 +2199,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
&& !mSwitchingUser && !isFaceDisabled(user) && becauseCannotSkipBouncer
|
&& !mSwitchingUser && !isFaceDisabled(user) && becauseCannotSkipBouncer
|
||||||
&& !mKeyguardGoingAway && mBiometricEnabledForUser.get(user) && !mLockIconPressed
|
&& !mKeyguardGoingAway && mBiometricEnabledForUser.get(user) && !mLockIconPressed
|
||||||
&& strongAuthAllowsScanning && mIsPrimaryUser
|
&& strongAuthAllowsScanning && mIsPrimaryUser
|
||||||
&& !mSecureCameraLaunched;
|
&& (!mSecureCameraLaunched || mOccludingAppRequestingFace);
|
||||||
|
|
||||||
// Aggregate relevant fields for debug logging.
|
// Aggregate relevant fields for debug logging.
|
||||||
if (DEBUG_FACE || DEBUG_SPEW) {
|
if (DEBUG_FACE || DEBUG_SPEW) {
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
/**
|
/**
|
||||||
* Animates in the bg protection circle behind the fp icon to highlight the icon.
|
* Animates in the bg protection circle behind the fp icon to highlight the icon.
|
||||||
*/
|
*/
|
||||||
void animateUdfpsBouncer() {
|
void animateUdfpsBouncer(Runnable onEndAnimation) {
|
||||||
if (mBgProtection.getVisibility() == View.VISIBLE && mBgProtection.getAlpha() == 1f) {
|
if (mBgProtection.getVisibility() == View.VISIBLE && mBgProtection.getAlpha() == 1f) {
|
||||||
// already fully highlighted, don't re-animate
|
// already fully highlighted, don't re-animate
|
||||||
return;
|
return;
|
||||||
@@ -186,6 +186,14 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_X, 0f, 1f),
|
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_X, 0f, 1f),
|
||||||
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_Y, 0f, 1f),
|
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_Y, 0f, 1f),
|
||||||
fpIconAnim);
|
fpIconAnim);
|
||||||
|
mAnimatorSet.addListener(new AnimatorListenerAdapter() {
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
if (onEndAnimation != null) {
|
||||||
|
onEndAnimation.run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
mAnimatorSet.start();
|
mAnimatorSet.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
mStatusBarStateController.removeCallback(mStateListener);
|
mStatusBarStateController.removeCallback(mStateListener);
|
||||||
mKeyguardViewManager.setAlternateAuthInterceptor(null);
|
mKeyguardViewManager.setAlternateAuthInterceptor(null);
|
||||||
mTransitioningFromHome = false;
|
mTransitioningFromHome = false;
|
||||||
|
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(false);
|
||||||
|
|
||||||
if (mCancelRunnable != null) {
|
if (mCancelRunnable != null) {
|
||||||
mCancelRunnable.run();
|
mCancelRunnable.run();
|
||||||
@@ -165,11 +166,13 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
mShowingUdfpsBouncer = show;
|
mShowingUdfpsBouncer = show;
|
||||||
updatePauseAuth();
|
updatePauseAuth();
|
||||||
if (mShowingUdfpsBouncer) {
|
if (mShowingUdfpsBouncer) {
|
||||||
mView.animateUdfpsBouncer();
|
mView.animateUdfpsBouncer(() ->
|
||||||
|
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(true));
|
||||||
mView.announceForAccessibility(mView.getContext().getString(
|
mView.announceForAccessibility(mView.getContext().getString(
|
||||||
R.string.accessibility_fingerprint_bouncer));
|
R.string.accessibility_fingerprint_bouncer));
|
||||||
} else {
|
} else {
|
||||||
mView.animateAwayUdfpsBouncer(null);
|
mView.animateAwayUdfpsBouncer(null);
|
||||||
|
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,8 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
|
|||||||
public static final int MODE_ONLY_WAKE = 4;
|
public static final int MODE_ONLY_WAKE = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mode in which fingerprint unlocks the device.
|
* Mode in which fingerprint unlocks the device or passive auth (ie face auth) unlocks the
|
||||||
|
* device while being requested when keyguard is occluded.
|
||||||
*/
|
*/
|
||||||
public static final int MODE_UNLOCK_COLLAPSING = 5;
|
public static final int MODE_UNLOCK_COLLAPSING = 5;
|
||||||
|
|
||||||
@@ -355,7 +356,9 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
|
|||||||
Optional.ofNullable(BiometricUiEvent.SUCCESS_EVENT_BY_SOURCE_TYPE.get(biometricSourceType))
|
Optional.ofNullable(BiometricUiEvent.SUCCESS_EVENT_BY_SOURCE_TYPE.get(biometricSourceType))
|
||||||
.ifPresent(UI_EVENT_LOGGER::log);
|
.ifPresent(UI_EVENT_LOGGER::log);
|
||||||
|
|
||||||
boolean unlockAllowed = mKeyguardBypassController.onBiometricAuthenticated(
|
boolean unlockAllowed =
|
||||||
|
mKeyguardStateController.isOccluded()
|
||||||
|
|| mKeyguardBypassController.onBiometricAuthenticated(
|
||||||
biometricSourceType, isStrongBiometric);
|
biometricSourceType, isStrongBiometric);
|
||||||
if (unlockAllowed) {
|
if (unlockAllowed) {
|
||||||
mKeyguardViewMediator.userActivity();
|
mKeyguardViewMediator.userActivity();
|
||||||
@@ -581,6 +584,9 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
|
|||||||
if (unlockingAllowed && deviceDreaming) {
|
if (unlockingAllowed && deviceDreaming) {
|
||||||
return bypass ? MODE_WAKE_AND_UNLOCK_FROM_DREAM : MODE_ONLY_WAKE;
|
return bypass ? MODE_WAKE_AND_UNLOCK_FROM_DREAM : MODE_ONLY_WAKE;
|
||||||
}
|
}
|
||||||
|
if (unlockingAllowed && mKeyguardStateController.isOccluded()) {
|
||||||
|
return MODE_UNLOCK_COLLAPSING;
|
||||||
|
}
|
||||||
if (mKeyguardViewController.isShowing()) {
|
if (mKeyguardViewController.isShowing()) {
|
||||||
if (mKeyguardViewController.bouncerIsOrWillBeShowing() && unlockingAllowed) {
|
if (mKeyguardViewController.bouncerIsOrWillBeShowing() && unlockingAllowed) {
|
||||||
if (bypass && mKeyguardBypassController.canPlaySubtleWindowAnimations()) {
|
if (bypass && mKeyguardBypassController.canPlaySubtleWindowAnimations()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user