diff --git a/packages/SystemUI/res/drawable/fingerprint_bg.xml b/packages/SystemUI/res/drawable/fingerprint_bg.xml index 558ec08b2ceb9..2b0ab6f9a8d24 100644 --- a/packages/SystemUI/res/drawable/fingerprint_bg.xml +++ b/packages/SystemUI/res/drawable/fingerprint_bg.xml @@ -14,11 +14,10 @@ --> + android:color="?android:attr/colorBackground"/> - - - - - + android:padding="48px" + android:layout_gravity="center" + android:scaleType="centerCrop"/> mLockIcon.setImageTintList( - ColorStateList.valueOf((int) animation.getAnimatedValue()))); - lockIconColorAnimator.setDuration(150); - - if (mBgAnimator != null) { - if (mBgAnimator.isRunning()) { - return; - } - mBgAnimator.cancel(); - } - mBgAnimator = new AnimatorSet(); - mBgAnimator.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - super.onAnimationEnd(animation); - mBgAnimator = null; - } - }); - mBgAnimator.playTogether( - bgAlphaAnimator, - scaleYAnimator, - scaleXAnimator, - lockIconColorAnimator); - mBgAnimator.setStartDelay(167); - mUnlockBgView.setAlpha(0f); - mUnlockBgView.setScaleX(0); - mUnlockBgView.setScaleY(0); - mUnlockBgView.setVisibility(View.VISIBLE); - - mBgAnimator.start(); - } - void setCenterLocation(@NonNull PointF center, int radius) { mLockIconCenter = center; mRadius = radius; @@ -163,6 +70,7 @@ public class LockIconView extends FrameLayout implements Dumpable { return mLockIconCenter.y - mRadius; } + @Override public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { pw.println("Center in px (x, y)= (" + mLockIconCenter.x + ", " + mLockIconCenter.y + ")"); diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java index cc0381fa3b6fd..373d4df146d56 100644 --- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java @@ -43,6 +43,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; +import com.android.settingslib.Utils; import com.android.systemui.Dumpable; import com.android.systemui.R; import com.android.systemui.biometrics.AuthController; @@ -158,7 +159,6 @@ public class LockIconViewController extends ViewController impleme mUnlockedLabel = context.getResources().getString(R.string.accessibility_unlock_button); mLockedLabel = context.getResources().getString(R.string.accessibility_lock_icon); dumpManager.registerDumpable("LockIconViewController", this); - } @Override @@ -238,7 +238,6 @@ public class LockIconViewController extends ViewController impleme mView.setImageDrawable(mLockIcon); mView.setVisibility(View.VISIBLE); mView.setContentDescription(mLockedLabel); - mView.hideBg(); } else if (mShowUnlockIcon) { if (wasShowingFpIcon) { mView.setImageDrawable(mFpToUnlockIcon); @@ -249,11 +248,9 @@ public class LockIconViewController extends ViewController impleme mLockToUnlockIcon.forceAnimationOnUI(); mLockToUnlockIcon.start(); } - mView.animateBg(); mView.setVisibility(View.VISIBLE); mView.setContentDescription(mUnlockedLabel); } else { - mView.hideBg(); mView.setVisibility(View.INVISIBLE); mView.setContentDescription(null); } @@ -298,7 +295,11 @@ public class LockIconViewController extends ViewController impleme } private void updateColors() { - mView.updateColor(); + final int color = Utils.getColorAttrDefaultColor(mView.getContext(), + R.attr.wallpaperTextColorAccent); + mFpToUnlockIcon.setTint(color); + mLockToUnlockIcon.setTint(color); + mLockIcon.setTint(color); } private void updateConfiguration() { @@ -458,7 +459,6 @@ public class LockIconViewController extends ViewController impleme @Override public void onConfigChanged(Configuration newConfig) { updateConfiguration(); - updateColors(); } };