summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/recents/RecentsService.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/RecentsService.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
index 9acb2bd..0c2c11d 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsService.java
@@ -83,20 +83,29 @@ class SystemUIMessageHandler extends Handler {
stack.addTask(new Task());
tsv.computeRects(taskStackBounds.width(), taskStackBounds.height() -
systemInsets.top - systemInsets.bottom, 0, 0);
- tsv.boundScroll();
+ tsv.setStackScrollToInitialState();
transform = tsv.getStackTransform(0, tsv.getStackScroll());
transform.rect.offset(taskStackBounds.left, taskStackBounds.top);
replyData.putParcelable(AlternateRecentsComponent.KEY_SINGLE_TASK_STACK_RECT,
new Rect(transform.rect));
- // Also calculate the target task rect when there are multiple tasks.
+ // Also calculate the target task rect when there are two tasks.
stack.addTask(new Task());
tsv.computeRects(taskStackBounds.width(), taskStackBounds.height() -
systemInsets.top - systemInsets.bottom, 0, 0);
- tsv.setStackScrollRaw(Integer.MAX_VALUE);
- tsv.boundScroll();
+ tsv.setStackScrollToInitialState();
transform = tsv.getStackTransform(1, tsv.getStackScroll());
transform.rect.offset(taskStackBounds.left, taskStackBounds.top);
+ replyData.putParcelable(AlternateRecentsComponent.KEY_TWO_TASK_STACK_RECT,
+ new Rect(transform.rect));
+
+ // Also calculate the target task rect when there are two tasks.
+ stack.addTask(new Task());
+ tsv.computeRects(taskStackBounds.width(), taskStackBounds.height() -
+ systemInsets.top - systemInsets.bottom, 0, 0);
+ tsv.setStackScrollToInitialState();
+ transform = tsv.getStackTransform(2, tsv.getStackScroll());
+ transform.rect.offset(taskStackBounds.left, taskStackBounds.top);
replyData.putParcelable(AlternateRecentsComponent.KEY_MULTIPLE_TASK_STACK_RECT,
new Rect(transform.rect));