diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-28 08:04:23 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-28 08:04:23 +0000 |
commit | 5f806416fe8cb4306ec817aeb60ea42f07ea823f (patch) | |
tree | a2d8cd9453272c367f01a5699fc4e507fa85f16a | |
parent | 361d06dde0698c72dd1338f375415e9bc06a1b54 (diff) | |
parent | 4bbb12c34d12ebded7bae284284b1adf70d98937 (diff) | |
download | base-5f806416fe8cb4306ec817aeb60ea42f07ea823f.tar.gz |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/21598816'] into tm-qpr2-b-release.
Change-Id: I7d2335e26c5c69e8404239474765c0ac196fc35d
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java index 5d7a6f122e69..8b21d47f1164 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -230,14 +230,6 @@ public class KeyguardSecurityContainer extends ConstraintLayout { } updateChildren(0 /* translationY */, 1f /* alpha */); } - - private void updateChildren(int translationY, float alpha) { - for (int i = 0; i < KeyguardSecurityContainer.this.getChildCount(); ++i) { - View child = KeyguardSecurityContainer.this.getChildAt(i); - child.setTranslationY(translationY); - child.setAlpha(alpha); - } - } }; // Used to notify the container when something interesting happens. @@ -562,6 +554,7 @@ public class KeyguardSecurityContainer extends ConstraintLayout { * This will run when the bouncer shows in all cases except when the user drags the bouncer up. */ public void startAppearAnimation(SecurityMode securityMode) { + updateChildren(0 /* translationY */, 1f /* alpha */); mViewMode.startAppearAnimation(securityMode); } @@ -736,6 +729,23 @@ public class KeyguardSecurityContainer extends ConstraintLayout { mViewMode.onDensityOrFontScaleChanged(); } + void resetScale() { + setScale(1); + } + + private void setScale(float scale) { + setScaleX(scale); + setScaleY(scale); + } + + private void updateChildren(int translationY, float alpha) { + for (int i = 0; i < getChildCount(); ++i) { + View child = getChildAt(i); + child.setTranslationY(translationY); + child.setAlpha(alpha); + } + } + /** * Enscapsulates the differences between bouncer modes for the container. */ |