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

Commit c64fd1ee authored by Louis Chang's avatar Louis Chang
Browse files

Updates the top-resumed activity if nothing to resume

In the freeform windowing environment, the top-resumed activity
was not updated after applying WCT to reorder a Task to front.
That’s because the top-resumed activity update was ignored in
WCT due to the defer-resume being applied. Moving an visible
Task to front also won’t result in any activity state changes.
Therefore, the top-resumed activity was incorrect.

Bug: 376841072
Test: wm presubmit
Flag: EXEMPT bugfix
Change-Id: I38dc407df1d151175671223a8aeab1776fa238b0
parent 967f4c99
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -788,7 +788,9 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                deferResume = false;
                // Already calls ensureActivityConfig
                mService.mRootWindowContainer.ensureActivitiesVisible();
                mService.mRootWindowContainer.resumeFocusedTasksTopActivities();
                if (!mService.mRootWindowContainer.resumeFocusedTasksTopActivities()) {
                    mService.mTaskSupervisor.updateTopResumedActivityIfNeeded("endWCT-effects");
                }
            } else if ((effects & TRANSACT_EFFECTS_CLIENT_CONFIG) != 0) {
                for (int i = haveConfigChanges.size() - 1; i >= 0; --i) {
                    haveConfigChanges.valueAt(i).forAllActivities(r -> {