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

Commit 5e8aff4b authored by lumark's avatar lumark
Browse files

Fix startActivityFromRecents didn't apply options in time.

When calling startActivityFromRecents to input activity options
for override app transition but may broken to call applyOptionsLocked
right away in some cases, caused pendingOptions will be cleared by client.

A quick fix to call applyOptionsLocked right after moveTaskToFrontLocked
in startActivityFromRecents to prevent this sequence broken.

Bug: 120944517
Test: manual as b/120944517#comment5 test steps
Change-Id: Ic39211ddf77f2c56e340d3e337fc564a9e4603ac
parent 1153b780
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2642,6 +2642,9 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                try {
                    mService.moveTaskToFrontLocked(task.taskId, 0, options,
                            true /* fromRecents */);
                    // Apply options to prevent pendingOptions be taken by client to make sure
                    // the override pending app transition will be applied immediately.
                    targetActivity.applyOptionsLocked();
                } finally {
                    mActivityMetricsLogger.notifyActivityLaunched(START_TASK_TO_FRONT,
                            targetActivity);