From c259917d01997147f5bd7b4c7fd6e423526f8df3 Mon Sep 17 00:00:00 2001 From: Beverly Date: Wed, 4 Aug 2021 15:47:38 -0400 Subject: [PATCH] Remove UDFPS hint animation Used to be called when face auth failed or after a timeout. Fixes: 195565894 Test: manual Change-Id: I0075153d9c1df1ba2dc57c5a1ba5d0c08dd6b643 --- .../biometrics/UdfpsKeyguardView.java | 14 --- .../UdfpsKeyguardViewController.java | 85 ------------------- 2 files changed, 99 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java index d122610c395df..d46426a036215 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java @@ -23,7 +23,6 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; -import android.animation.ValueAnimator; import android.content.Context; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; @@ -68,8 +67,6 @@ public class UdfpsKeyguardView extends UdfpsAnimationView { private float mBurnInProgress; private float mInterpolatedDarkAmount; - private ValueAnimator mHintAnimator; - public UdfpsKeyguardView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); mFingerprintDrawable = new UdfpsFpDrawable(context); @@ -94,9 +91,6 @@ public class UdfpsKeyguardView extends UdfpsAnimationView { new KeyPath("**"), LottieProperty.COLOR_FILTER, frameInfo -> new PorterDuffColorFilter(mTextColorPrimary, PorterDuff.Mode.SRC_ATOP) ); - - mHintAnimator = ObjectAnimator.ofFloat(mLockScreenFp, "progress", 1f, 0f, 1f); - mHintAnimator.setDuration(4000); } @Override @@ -183,19 +177,11 @@ public class UdfpsKeyguardView extends UdfpsAnimationView { } void onDozeAmountChanged(float linear, float eased) { - mHintAnimator.cancel(); mInterpolatedDarkAmount = eased; updateAlpha(); updateBurnInOffsets(); } - void animateHint() { - if (!isShadeLocked() && !mUdfpsRequested && mAlpha == 255 - && mLockScreenFp.isVisibleToUser()) { - mHintAnimator.start(); - } - } - /** * Animates in the bg protection circle behind the fp icon to highlight the icon. */ diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java index 58f1254da5638..4896305daa2eb 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java @@ -20,14 +20,10 @@ import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import android.annotation.NonNull; import android.content.res.Configuration; -import android.hardware.biometrics.BiometricSourceType; import android.util.MathUtils; import android.view.MotionEvent; -import androidx.annotation.Nullable; - import com.android.keyguard.KeyguardUpdateMonitor; -import com.android.keyguard.KeyguardUpdateMonitorCallback; import com.android.systemui.R; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; @@ -46,14 +42,8 @@ import java.io.PrintWriter; /** * Class that coordinates non-HBM animations during keyguard authentication. - * - * Highlights the udfps icon when: - * - Face authentication has failed - * - Face authentication has been run for > 2 seconds */ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController { - private static final long AFTER_FACE_AUTH_HINT_DELAY = 2000; - @NonNull private final StatusBarKeyguardViewManager mKeyguardViewManager; @NonNull private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; @NonNull private final DelayableExecutor mExecutor; @@ -62,12 +52,10 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController showHint(false), - AFTER_FACE_AUTH_HINT_DELAY); - } - - mFaceDetectRunning = running; - } - - private void showHint(boolean forceShow) { - cancelDelayedHint(); - if (!mHintShown || forceShow) { - mHintShown = true; - mView.animateHint(); - } - } - /** * Set the progress we're currently transitioning to the full shade. 0.0f means we're not * transitioning yet, while 1.0f means we've fully dragged down. @@ -318,39 +266,6 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController