[Multiline] If a multiline searchbox can scroll up, don't scroll all apps container

Bug: b/390540638
Flag: EXEMPT bug fix
Test: Before: http://recall/clips/2c3e5774-c0ba-4a2d-b878-db3a6efec247
Test: After: http://recall/clips/3c98c52b-7f94-4dd4-a6f6-560403d4a426
Change-Id: I9dad962740ec31edad6213c41e2dec04deeedf0b
This commit is contained in:
Kevin Lim committed 2025-05-21 15:28:01 -07:00
1 parent 6d532fe59d
commit dddf56f5b1
1 file changed
+15 -4
@@ -435,10 +435,21 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
public boolean shouldContainerScroll(MotionEvent ev) {
BaseDragLayer dragLayer = mActivityContext.getDragLayer();
// IF the MotionEvent is inside the search box or handle area, and the container keeps on
// receiving touch input, container should move down.
if (dragLayer.isEventOverView(mSearchContainer, ev)
|| dragLayer.isEventOverView(mBottomSheetHandleArea, ev)) {
// If the MotionEvent is inside the search box, and the container keeps on receiving touch
// input, container should move down.
if (dragLayer.isEventOverView(mSearchContainer, ev)) {
// If the touch was on the edit text, container should move down ONLY when edit text is
// already at the top.
View editText = mSearchUiManager.getEditText();
if (editText != null && dragLayer.isEventOverView(editText, ev)) {
boolean canScrollUp = editText.canScrollVertically(-1);
return !canScrollUp;
}
return true;
}
// If the MotionEvent is inside the handle area, and the container keeps on receiving touch
// input, container should move down.
if (dragLayer.isEventOverView(mBottomSheetHandleArea, ev)) {
return true;
}
AllAppsRecyclerView rv = getActiveRecyclerView();