From 41e77de54e8167da7d8a1b224e855ba0fb65e4c1 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Thu, 22 Jul 2021 16:13:49 +0100 Subject: [PATCH] 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 --- quickstep/src/com/android/quickstep/views/RecentsView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index edda439fd7..c19772ae5a 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -3710,8 +3710,8 @@ public abstract class RecentsView clearAllScroll)) { + if ((mIsRtl && pageScroll < clearAllScroll + clearAllWidth) + || (!mIsRtl && pageScroll > clearAllScroll - clearAllWidth)) { pageScroll = clearAllScroll + (mIsRtl ? clearAllWidth : -clearAllWidth); } if (outPageScrolls[i] != pageScroll) {