Fixes activity not resumed after applying WCT
The activity is now deferred resumed while applying WCT after commit
5be6938. 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
diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java
index d26df7a..a49048c 100644
--- a/services/core/java/com/android/server/wm/WindowOrganizerController.java
+++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java
@@ -1105,6 +1105,7 @@
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 @@
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;