Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41e77de5 authored by Alex Chau's avatar Alex Chau
Browse files

Avoid seeing ClearAllButton for overview grid's snap position

- This is a follow-up of http://ag/15220572
- When determining if task's snap position is too close to ClearAllButton, avoid positions that will see part of ClearAllButton

Bug: 192254835
Test: manual
Change-Id: I09425075ff0c24835ac3c4e79856aef7985476b2
parent b971baef
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3710,8 +3710,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
            TaskView taskView = getTaskViewAt(i);
            float scrollDiff = taskView.getScrollAdjustment(showAsFullscreen, showAsGrid);
            int pageScroll = newPageScrolls[i + mTaskViewStartIndex] + (int) scrollDiff;
            if ((mIsRtl && pageScroll < clearAllScroll)
                    || (!mIsRtl && pageScroll > clearAllScroll)) {
            if ((mIsRtl && pageScroll < clearAllScroll + clearAllWidth)
                    || (!mIsRtl && pageScroll > clearAllScroll - clearAllWidth)) {
                pageScroll = clearAllScroll + (mIsRtl ? clearAllWidth : -clearAllWidth);
            }
            if (outPageScrolls[i] != pageScroll) {