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

Commit 3106ae01 authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Fixed leak of app token in exiting list.

- Remove app token from exiting list when it's last window is removed.
- Remove app token from exiting list when it's removal isn't delayed.

Test: Launch a few apps and press back and make sure the exit app to
list dump is empty.
Fixes: 38337456

Change-Id: Ia2f22c6f1add5f867e25583ec38ffccc71217ee7
parent 2df0155a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -560,6 +560,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
            // with it will be removed as soon as their animations are complete
            mAppAnimator.clearAnimation();
            mAppAnimator.animating = false;
            if (stack != null) {
                stack.mExitingAppTokens.remove(this);
            }
            removeIfPossible();
        }

+4 −0
Original line number Diff line number Diff line
@@ -1685,6 +1685,10 @@ public class WindowManagerService extends IWindowManager.Stub
                // re-factor.
                atoken.firstWindowDrawn = false;
                atoken.clearAllDrawn();
                final TaskStack stack = atoken.getStack();
                if (stack != null) {
                    stack.mExitingAppTokens.remove(atoken);
                }
            }
        }