Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a980119 authored by Aaron Liu's avatar Aaron Liu
Browse files

[Bouncer] Move reset logic to end event.

Move reset logic to end event. Looking at the logs, we see
OpenGLRenderer: endAllStagingAnimators on 0xb40000779658e860 (KeyguardPINView)

We are still seeing the pin pad is disappearing. It's likely that we
need to capture the end event.

Bug: 228886154
Test: Manual on device
Change-Id: Ife8683c1e1668924859da3b648c5211a44ed7e7c
parent 1f9afd72
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -216,22 +216,16 @@ public class AppearAnimationUtils implements AppearAnimationCreator<View> {
                });
            }
            alphaAnim.addListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationCancel(Animator animation) {
                    // If Animation is canceled, we want to ensure UI is reset.
                    view.setAlpha(targetAlpha);
                    view.setTranslationY(targetTranslationY);
                }

                @Override
                public void onAnimationEnd(Animator animation) {
                    view.setAlpha(targetAlpha);
                    if (endRunnable != null) {
                        endRunnable.run();
                    }
                }
            });
            alphaAnim.start();
            startTranslationYAnimation(view, delay, duration, appearing ? 0 : translationY,
            startTranslationYAnimation(view, delay, duration, targetTranslationY,
                    interpolator, animatorListener);
        }
    }
@@ -265,6 +259,12 @@ public class AppearAnimationUtils implements AppearAnimationCreator<View> {
        if (listener != null) {
            translationAnim.addListener(listener);
        }
        translationAnim.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                view.setTranslationY(endTranslationY);
            }
        });
        translationAnim.start();
    }