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

Commit 4d1835db authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix stuck activity

Assume the following sequence of events:

- prepareAppTransition
- setVisibility(app)
- okToAnimate -> false
- setVisibility(app)

In this case, the first setVisibility call sets a dummy animation
but the second setVisibility call removes the app from
mOpeningApps but does not clear out the animation. In that case,
the app is stuck with the dummy animation set that will get never
cleared.

To fix this, we always reset the animation if a dummy animation is
set when changing the visibility, no matter we use a transit or
not.

Test: Unlock with fingerprint from AOD to homescreen
Change-Id: I0dbe2d9836238aba7f16d3e45649fd4b82ff52f6
Fixes: 65067824
parent c1235a1f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -450,7 +450,7 @@ public class AppWindowAnimator {
        return isAnimating;
    }

    void dump(PrintWriter pw, String prefix, boolean dumpAll) {
    void dump(PrintWriter pw, String prefix) {
        pw.print(prefix); pw.print("mAppToken="); pw.println(mAppToken);
        pw.print(prefix); pw.print("mAnimator="); pw.println(mAnimator);
        pw.print(prefix); pw.print("freezingScreen="); pw.print(freezingScreen);
+6 −3
Original line number Diff line number Diff line
@@ -368,10 +368,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree

            boolean runningAppAnimation = false;

            if (transit != AppTransition.TRANSIT_UNSET) {
            if (mAppAnimator.animation == AppWindowAnimator.sDummyAnimation) {
                mAppAnimator.setNullAnimation();
            }
            if (transit != AppTransition.TRANSIT_UNSET) {
                if (mService.applyAnimationLocked(this, lp, transit, visible, isVoiceInteraction)) {
                    delayed = runningAppAnimation = true;
                }
@@ -1759,6 +1759,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        if (mRemovingFromDisplay) {
            pw.println(prefix + "mRemovingFromDisplay=" + mRemovingFromDisplay);
        }
        if (mAppAnimator.isAnimating()) {
            mAppAnimator.dump(pw, prefix + "  ");
        }
    }

    @Override