diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 7f085b7d24..023a926e10 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -4358,12 +4358,14 @@ public abstract class RecentsView 0) { int minScroll; + boolean isLandscapeGridSplit = mActivity.getDeviceProfile().isLandscape + && showAsGrid() && isSplitSelectionActive(); if (mIsRtl) { // If we aren't showing the clear all button, use the rightmost task as the min // scroll. minScroll = getScrollForPage(mDisallowScrollToClearAll ? indexOfChild( getTaskViewAt(getTaskViewCount() - 1)) : indexOfChild(mClearAllButton)); - if (showAsGrid() && isSplitSelectionActive() + if (isLandscapeGridSplit && mSplitSelectStateController.getActiveSplitStagePosition() == SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT) { minScroll -= mSplitPlaceholderSize; @@ -4372,7 +4374,8 @@ public abstract class RecentsView 0) { int maxScroll; + boolean isLandscapeGridSplit = mActivity.getDeviceProfile().isLandscape + && showAsGrid() && isSplitSelectionActive(); if (mIsRtl) { TaskView focusedTaskView = mShowAsGridLastOnLayout ? getFocusedTaskView() : null; maxScroll = getScrollForPage(focusedTaskView != null ? indexOfChild(focusedTaskView) : 0); - if (showAsGrid() && isSplitSelectionActive() + if (isLandscapeGridSplit && mSplitSelectStateController.getActiveSplitStagePosition() == SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT) { maxScroll += mSplitPlaceholderSize; @@ -4397,7 +4402,8 @@ public abstract class RecentsView