diff options
author | Beverly <beverlyt@google.com> | 2021-07-14 16:01:50 -0400 |
---|---|---|
committer | Beverly Tai <beverlyt@google.com> | 2021-07-15 01:24:22 +0000 |
commit | 09923d5eca02486324b55c9f28562d17418fc577 (patch) | |
tree | 3d4e808391655e43a4b489617cbce2db0bcaf422 /packages/SystemUI/src/com/android/keyguard/LockIconViewController.java | |
parent | 51c13dcc6ceea54947703917c718246e9256c510 (diff) |
Animate in a background for kg unlock icon
- to indicate it is tappable
- update background drawable on color change to update
color
Test: manual
Fixes: 192403524
Change-Id: I34255e3f7cc7b1dfc246c4e2441822129abdf819
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/LockIconViewController.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java index afea27222fbb..a7bd4c8e3d27 100644 --- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java @@ -40,7 +40,6 @@ 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; @@ -145,6 +144,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme mUnlockedLabel = context.getResources().getString(R.string.accessibility_unlock_button); mLockedLabel = context.getResources().getString(R.string.accessibility_lock_icon); dumpManager.registerDumpable("LockIconViewController", this); + } @Override @@ -224,6 +224,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme mView.setImageDrawable(mLockIcon); mView.setVisibility(View.VISIBLE); mView.setContentDescription(mLockedLabel); + mView.hideBg(); } else if (mShowUnlockIcon) { if (wasShowingFpIcon) { mView.setImageDrawable(mFpToUnlockIcon); @@ -234,9 +235,11 @@ public class LockIconViewController extends ViewController<LockIconView> impleme mLockToUnlockIcon.forceAnimationOnUI(); mLockToUnlockIcon.start(); } + mView.animateBg(); mView.setVisibility(View.VISIBLE); mView.setContentDescription(mUnlockedLabel); } else { + mView.hideBg(); mView.setVisibility(View.INVISIBLE); mView.setContentDescription(null); } @@ -281,11 +284,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme } private void updateColors() { - final int color = Utils.getColorAttrDefaultColor(mView.getContext(), - R.attr.wallpaperTextColorAccent); - mFpToUnlockIcon.setTint(color); - mLockToUnlockIcon.setTint(color); - mLockIcon.setTint(color); + mView.updateColor(); } private void updateConfiguration() { @@ -445,6 +444,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme @Override public void onConfigChanged(Configuration newConfig) { updateConfiguration(); + updateColors(); } }; |