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

Commit 1050ff9e authored by Louis Chang's avatar Louis Chang
Browse files

Fixes activity not resumed after applying WCT

The activity is now deferred resumed while applying WCT after commit
5be69389. With that change, the op that effects the activity lifecycle
should be correctly noted.

Bug: 348504324
Test: wm presubmit
Flag: EXEMPT bugfix
Change-Id: Idc87e6898f3055e97cf0cc670ad379789d722660
parent c5002e47
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1105,6 +1105,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                    break;
                }
                if (activity.isVisible() || activity.isVisibleRequested()) {
                    effects |= TRANSACT_EFFECTS_LIFECYCLE;
                    // Prevent the transition from being executed too early if the activity is
                    // visible.
                    activity.finishIfPossible("finish-activity-op", false /* oomAdj */);
@@ -1122,6 +1123,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
                launchOpts.remove(WindowContainerTransaction.HierarchyOp.LAUNCH_KEY_TASK_ID);
                final SafeActivityOptions safeOptions =
                        SafeActivityOptions.fromBundle(launchOpts, caller.mPid, caller.mUid);
                effects |= TRANSACT_EFFECTS_LIFECYCLE;
                waitAsyncStart(() -> mService.mTaskSupervisor.startActivityFromRecents(
                        caller.mPid, caller.mUid, taskId, safeOptions));
                break;