diff options
| author | 2023-01-23 11:18:40 -0800 | |
|---|---|---|
| committer | 2023-01-24 11:22:01 -0800 | |
| commit | f5336a189f9b523d28d3ed48a1ab72e6b8d4b2df (patch) | |
| tree | aa263c068b1d641355d34ddc5b25e1db2b7862e7 | |
| parent | d2909c6cdd9f190322c5fbf50339548cb67da5a4 (diff) | |
Reset view flipper alpha to 1.
I've seen insteances of the inset animation setting the view flipper
alpha to 0 where end is never called and the alpha never gets reset to
1. When we start the appear animation, we want to ensure that the view
flipper alpha is set to 1.
Fixes: 261730718
Test: Open and close bouncer in password and then change security method
to pattern and open and close bouncer.
Change-Id: I69deffb7f9828ecbe851b8feb8335a9b1fd87499
| -rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java index e4f85db3971e..5fd2fabfe8ab 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -235,14 +235,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); - } - } }; private final OnBackAnimationCallback mBackCallback = new OnBackAnimationCallback() { @@ -594,6 +586,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); } @@ -777,6 +770,14 @@ public class KeyguardSecurityContainer extends ConstraintLayout { 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. */ |