Merge "Avoid seeing ClearAllButton for overview grid's snap position" into sc-v2-dev

This commit is contained in:
Alex Chau
2021-07-23 11:27:27 +00:00
committed by Android (Google) Code Review
@@ -3756,8 +3756,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
TaskView taskView = getTaskViewAt(i); TaskView taskView = getTaskViewAt(i);
float scrollDiff = taskView.getScrollAdjustment(showAsFullscreen, showAsGrid); float scrollDiff = taskView.getScrollAdjustment(showAsFullscreen, showAsGrid);
int pageScroll = newPageScrolls[i + mTaskViewStartIndex] + (int) scrollDiff; int pageScroll = newPageScrolls[i + mTaskViewStartIndex] + (int) scrollDiff;
if ((mIsRtl && pageScroll < clearAllScroll) if ((mIsRtl && pageScroll < clearAllScroll + clearAllWidth)
|| (!mIsRtl && pageScroll > clearAllScroll)) { || (!mIsRtl && pageScroll > clearAllScroll - clearAllWidth)) {
pageScroll = clearAllScroll + (mIsRtl ? clearAllWidth : -clearAllWidth); pageScroll = clearAllScroll + (mIsRtl ? clearAllWidth : -clearAllWidth);
} }
if (outPageScrolls[i] != pageScroll) { if (outPageScrolls[i] != pageScroll) {