diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml index b98694e2fae73..fcb369876cf2d 100644 --- a/packages/SystemUI/res/values-night/colors.xml +++ b/packages/SystemUI/res/values-night/colors.xml @@ -77,7 +77,7 @@ #fff28b82 - #ffffff + #7DA7F1 #FF41Af6A #5195EA diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index 8a3bacae9243c..e455aaa225be6 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -134,10 +134,10 @@ #ffd93025 - #000000 - #cc4285f4 - #ff669DF6 - #ffEE675C + #7DA7F1 + #475670 + #7DA7F1 + #ffEE675C #1f000000 diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java index 1f01fc5a4b3d1..ac38b13cc4dd4 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollDrawable.java @@ -20,9 +20,7 @@ import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.content.Context; -import android.content.res.TypedArray; import android.graphics.Canvas; -import android.graphics.Color; import android.graphics.Paint; import android.graphics.PointF; import android.graphics.Rect; @@ -30,7 +28,6 @@ import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Looper; -import android.util.TypedValue; import android.view.animation.AccelerateDecelerateInterpolator; import android.view.animation.LinearInterpolator; @@ -38,7 +35,6 @@ import androidx.annotation.ColorInt; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import com.android.internal.graphics.ColorUtils; import com.android.systemui.R; /** @@ -106,9 +102,8 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { mSensorOutlinePaint = new Paint(0 /* flags */); mSensorOutlinePaint.setAntiAlias(true); - mSensorOutlinePaint.setColor(mContext.getColor(R.color.udfps_enroll_icon)); - mSensorOutlinePaint.setStyle(Paint.Style.STROKE); - mSensorOutlinePaint.setStrokeWidth(2.f); + mSensorOutlinePaint.setColor(mContext.getColor(R.color.udfps_moving_target_fill)); + mSensorOutlinePaint.setStyle(Paint.Style.FILL); mBlueFill = new Paint(0 /* flags */); mBlueFill.setAntiAlias(true); @@ -117,12 +112,12 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { mMovingTargetFpIcon = context.getResources() .getDrawable(R.drawable.ic_kg_fingerprint, null); - mMovingTargetFpIcon.setTint(Color.WHITE); + mMovingTargetFpIcon.setTint(mContext.getColor(R.color.udfps_enroll_icon)); mMovingTargetFpIcon.mutate(); mFingerprintDrawable.setTint(mContext.getColor(R.color.udfps_enroll_icon)); - mHintColorFaded = getHintColorFaded(context); + mHintColorFaded = context.getColor(R.color.udfps_moving_target_fill); mHintColorHighlight = context.getColor(R.color.udfps_enroll_progress); mHintMaxWidthPx = Utils.dpToPixels(context, HINT_MAX_WIDTH_DP); mHintPaddingPx = Utils.dpToPixels(context, HINT_PADDING_DP); @@ -218,22 +213,6 @@ public class UdfpsEnrollDrawable extends UdfpsDrawable { }; } - @ColorInt - private static int getHintColorFaded(@NonNull Context context) { - final TypedValue tv = new TypedValue(); - context.getTheme().resolveAttribute(android.R.attr.disabledAlpha, tv, true); - final int alpha = (int) (tv.getFloat() * 255f); - - final int[] attrs = new int[] {android.R.attr.colorControlNormal}; - final TypedArray ta = context.obtainStyledAttributes(attrs); - try { - @ColorInt final int color = ta.getColor(0, context.getColor(R.color.white_disabled)); - return ColorUtils.setAlphaComponent(color, alpha); - } finally { - ta.recycle(); - } - } - void setEnrollHelper(@NonNull UdfpsEnrollHelper helper) { mEnrollHelper = helper; } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollProgressBarDrawable.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollProgressBarDrawable.java index 79c7e66d40f74..631a461b0627a 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollProgressBarDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsEnrollProgressBarDrawable.java @@ -18,12 +18,10 @@ package com.android.systemui.biometrics; import android.animation.ValueAnimator; import android.content.Context; -import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.Paint; import android.graphics.drawable.Drawable; -import android.util.TypedValue; import android.view.animation.Interpolator; import android.view.animation.OvershootInterpolator; @@ -80,24 +78,11 @@ public class UdfpsEnrollProgressBarDrawable extends Drawable { mBackgroundPaint = new Paint(); mBackgroundPaint.setStrokeWidth(mStrokeWidthPx); - mBackgroundPaint.setColor(context.getColor(R.color.white_disabled)); + mBackgroundPaint.setColor(context.getColor(R.color.udfps_moving_target_fill)); mBackgroundPaint.setAntiAlias(true); mBackgroundPaint.setStyle(Paint.Style.STROKE); mBackgroundPaint.setStrokeCap(Paint.Cap.ROUND); - // Set background paint color and alpha. - final int[] attrs = new int[] {android.R.attr.colorControlNormal}; - final TypedArray typedArray = context.obtainStyledAttributes(attrs); - try { - @ColorInt final int tintColor = typedArray.getColor(0, mBackgroundPaint.getColor()); - mBackgroundPaint.setColor(tintColor); - } finally { - typedArray.recycle(); - } - TypedValue alpha = new TypedValue(); - context.getTheme().resolveAttribute(android.R.attr.disabledAlpha, alpha, true); - mBackgroundPaint.setAlpha((int) (alpha.getFloat() * 255f)); - // Progress fill should *not* use the extracted system color. mFillPaint = new Paint(); mFillPaint.setStrokeWidth(mStrokeWidthPx);