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

Commit c33c69c1 authored by Tony Huang's avatar Tony Huang Committed by Android (Google) Code Review
Browse files

Merge "Snapshot 2 tasks when swipe up split case" into tm-qpr-dev

parents 4421353c 0fb921ef
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1834,6 +1834,17 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
                        if (mRecentsAnimationController == null) return;
                        final ThumbnailData taskSnapshot =
                                mRecentsAnimationController.screenshotTask(runningTaskId);
                        // If split case, we should update all split tasks snapshot
                        if (mIsSwipeForSplit) {
                            int[] splitTaskIds = TopTaskTracker.INSTANCE.get(
                                    mContext).getRunningSplitTaskIds();
                            for (int i = 0; i < splitTaskIds.length; i++) {
                                // Skip running one because done above.
                                if (splitTaskIds[i] == runningTaskId) continue;

                                mRecentsAnimationController.screenshotTask(splitTaskIds[i]);
                            }
                        }
                        MAIN_EXECUTOR.execute(() -> {
                            mTaskSnapshot = taskSnapshot;
                            if (!updateThumbnail(runningTaskId, false /* refreshView */)) {