diff options
author | 2025-03-24 13:23:22 -0700 | |
---|---|---|
committer | 2025-03-24 13:23:22 -0700 | |
commit | 44552dc98fc15eef89dce94290c45887462d7dfa (patch) | |
tree | ed3646b9d330d6b985cd583d784a0b03297c9bc8 /quickstep/src | |
parent | 16210fa12946393caa7ca5d306f715fc87c149cb (diff) | |
parent | 77481d611b45a9c433dc5d923646f6928d60754f (diff) |
Merge "Stay in the current task when a new desk is created" into main
Diffstat (limited to 'quickstep/src')
-rw-r--r-- | quickstep/src/com/android/quickstep/views/RecentsView.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index ea95206811..3e4b953b5b 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -7016,6 +7016,8 @@ public abstract class RecentsView< return; } + TaskView currentTaskView = getTaskViewAt(mCurrentPage); + // We assume that a newly added desk is always empty and gets added to the left of the // `AddNewDesktopButton`. DesktopTaskView desktopTaskView = @@ -7029,9 +7031,12 @@ public abstract class RecentsView< updateTaskSize(); mUtils.updateChildTaskOrientations(); + updateScrollSynchronously(); - // TODO: b/401002178 - Recalculate the new current page such that the addition of the new - // desk does not result in a change in the current scroll page. + // Set Current Page based on the stored TaskView. + if (currentTaskView != null) { + setCurrentPage(indexOfChild(currentTaskView)); + } } @Override |