From 656a026488ba47a927c9930408994b5259a70eaf Mon Sep 17 00:00:00 2001 From: Shamali P Date: Thu, 24 Oct 2024 19:05:45 +0000 Subject: [PATCH] Fix issue that expanding only search result led to weird scroll This piece of code was making list scroll for last item, which doesn't really resolve problem or help for expanding items at end of visible list. As such scrolling only to get last time into visible area doesn't benefit anything (but creates inconsistency). Bug: 371508727 Test: With talkback & screenshot tests Flag: EXEMPT BUGFIX Change-Id: I7ca519edfbb3a18c10fa518e28183da365f740e4 --- .../launcher3/widget/picker/WidgetsListAdapter.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java b/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java index 8dd1de4ac8..3d3a6690d2 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java +++ b/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java @@ -396,15 +396,6 @@ public class WidgetsListAdapter extends Adapter implements OnHeaderC LinearLayoutManager layoutManager = (LinearLayoutManager) mRecyclerView.getLayoutManager(); if (layoutManager == null) return; - if (position == mVisibleEntries.size() - 2 - && mVisibleEntries.get(mVisibleEntries.size() - 1) - instanceof WidgetsListContentEntry) { - // If the selected header is in the last position and its content is showing, then - // scroll to the final position so the last list of widgets will show. - layoutManager.scrollToPosition(mVisibleEntries.size() - 1); - return; - } - // Scroll to the header view's current offset, accounting for the recycler view's padding. // If the header view couldn't be found, then it will appear at the top of the list. layoutManager.scrollToPositionWithOffset(