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

Commit 073bea72 authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Take task snapshot on exiting PiP" into main

parents c958545e 609ae17f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4705,6 +4705,15 @@ class Task extends TaskFragment {
                // it does not follow the ActivityStarter path.
                if (topActivity.shouldBeVisible()) {
                    mAtmService.resumeAppSwitches();
                    // In pip1, when expanding pip to full-screen, the "behind" task is not
                    // actually becoming invisible since task windowing mode is pinned.
                    if (!isPip2ExperimentEnabled) {
                        final ActivityRecord ar = mAtmService.mLastResumedActivity;
                        if (ar != null && ar.getTask() != null) {
                            mAtmService.takeTaskSnapshot(ar.getTask().mTaskId,
                                    true /* updateCache */);
                        }
                    }
                }
            } else if (isPip2ExperimentEnabled) {
                super.setWindowingMode(windowingMode);