Snapshot 2 tasks when swipe up split case
Swipe up snapshot only capture the top one task, but for split screen case it should capture two tasks otherwise the snapshot in overview would be empty in some cases. Fix: 247420799 Test: manual Test: pass existing tests Change-Id: I3acd477eaca3cb98d86e2446dbb2dbd6295c687d
This commit is contained in:
@@ -1835,6 +1835,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 */)) {
|
||||
|
||||
Reference in New Issue
Block a user