From d122286a5751a50e21505a46635c3648118583bf Mon Sep 17 00:00:00 2001 From: Joshua Mccloskey Date: Wed, 19 Jan 2022 04:36:18 +0000 Subject: [PATCH] Removed edge and tip hint for udfps Test: Verified on multiple devices. Bug: 209807883 Change-Id: I8cc04956e8e041f43d76ccbb2ec8585b296138be Merged-In: I8cc04956e8e041f43d76ccbb2ec8585b296138be --- core/res/res/values/config.xml | 2 ++ core/res/res/values/symbols.xml | 1 + .../biometrics/UdfpsEnrollDrawable.java | 25 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index d9007e50c7c66..2ad2a5cfd2858 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -4652,6 +4652,8 @@ 0.75 + false + diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index f68c26d76610a..87a75da31850c 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2624,6 +2624,7 @@ + diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java index ac38b13cc4dd4..9137dca6cc713 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java @@ -97,6 +97,8 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { @NonNull private final ValueAnimator.AnimatorUpdateListener mEdgeHintWidthUpdateListener; @NonNull private final Animator.AnimatorListener mEdgeHintPulseListener; + private boolean mShowingNewUdfpsEnroll = false; + UdfpsEnrollDrawable(@NonNull Context context) { super(context); @@ -211,6 +213,8 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { @Override public void onAnimationRepeat(Animator animation) {} }; + mShowingNewUdfpsEnroll = context.getResources().getBoolean( + com.android.internal.R.bool.config_udfpsSupportsNewUi); } void setEnrollHelper(@NonNull UdfpsEnrollHelper helper) { @@ -292,6 +296,10 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { } mShouldShowTipHint = shouldShow; + if (mShowingNewUdfpsEnroll) { + return; + } + if (mTipHintWidthAnimator != null && mTipHintWidthAnimator.isRunning()) { mTipHintWidthAnimator.cancel(); } @@ -306,6 +314,7 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { } else { mTipHintWidthAnimator.start(); } + } private void updateEdgeHintVisibility() { @@ -315,6 +324,10 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { } mShouldShowEdgeHint = shouldShow; + if (mShowingNewUdfpsEnroll) { + return; + } + if (mEdgeHintWidthAnimator != null && mEdgeHintWidthAnimator.isRunning()) { mEdgeHintWidthAnimator.cancel(); } @@ -333,6 +346,10 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { } private void startTipHintPulseAnimation() { + if (mShowingNewUdfpsEnroll) { + return; + } + mHandler.removeCallbacksAndMessages(null); if (mTipHintAnimatorSet != null && mTipHintAnimatorSet.isRunning()) { mTipHintAnimatorSet.cancel(); @@ -353,6 +370,10 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { } private void startEdgeHintPulseAnimation() { + if (mShowingNewUdfpsEnroll) { + return; + } + mHandler.removeCallbacksAndMessages(null); if (mEdgeHintAnimatorSet != null && mEdgeHintAnimatorSet.isRunning()) { mEdgeHintAnimatorSet.cancel(); @@ -409,6 +430,10 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { mSensorOutlinePaint.setAlpha(mAlpha); } + if (mShowingNewUdfpsEnroll) { + return; + } + // Draw the finger tip or edges hint. if (isTipHintVisible() || isEdgeHintVisible()) { canvas.save();