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

Commit 03b2afba authored by Louis Chang's avatar Louis Chang
Browse files

Adding recents to stopping if the preload success

The recents activity could be removed from the hierarchy if
the preload was failed. And the activity will be leaked in the
stopping list since it was added to the list in the end of the
preload process.

Bug: 322752270
Test: wm presubmit
Change-Id: Id963c2e8d1c3d87e4c6c09c1debe0be335077fb9
parent 703fd3da
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -160,7 +160,8 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan

        // Invisible activity should be stopped. If the recents activity is alive and its doesn't
        // need to relaunch by current configuration, then it may be already in stopped state.
        if (!targetActivity.isState(STOPPING, STOPPED)) {
        if (!targetActivity.finishing && targetActivity.isAttached()
                && !targetActivity.isState(STOPPING, STOPPED)) {
            // Add to stopping instead of stop immediately. So the client has the chance to perform
            // traversal in non-stopped state (ViewRootImpl.mStopped) that would initialize more
            // things (e.g. the measure can be done earlier). The actual stop will be performed when