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

Commit d8609926 authored by Maryam Dehaini's avatar Maryam Dehaini
Browse files

Clear TaskInfo#capturedLink when filling task info

TaskInfo objects are sometimes reused and the captured link needs to be
cleared so that it is not shared from other tasks.

Bug: 349695493
Test: Open slides from gmail app and use button to switch to browser
Flag: com.android.window.flags.enable_desktop_windowing_app_to_web
Change-Id: I6968d48ee6293a33944eff071e5232119d0a370a
parent df7e8839
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2894,6 +2894,8 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
        ActivityRecord fillAndReturnTop(Task task, TaskInfo info) {
            info.numActivities = 0;
            info.baseActivity = null;
            info.capturedLink = null;
            info.capturedLinkTimestamp = 0;
            mInfo = info;
            task.forAllActivities(this);
            final ActivityRecord top = mTopRunning;
+3 −0
Original line number Diff line number Diff line
@@ -3506,6 +3506,9 @@ class Task extends TaskFragment {
        if (task.effectiveUid != baseActivityUid) {
            info.baseActivity = new ComponentName("", "");
        }

        info.capturedLink = null;
        info.capturedLinkTimestamp = 0;
    }

    @Nullable PictureInPictureParams getPictureInPictureParams() {