From bb10fa8fc2f125245163a50bf6cd04ff03bdfac4 Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Mon, 14 Aug 2017 12:35:53 -0700 Subject: Fix bug where all apps scrollbar jumps. The problem is that rowAppIndex is not being set when we swap in the new predictions. So when we call AllAppsRecyclerView#getCurrentScrollY, the "item.rowAppIndex == 0" clause returns true for every predicted app, which results in a larger than expected value. Bug: 64628968 Change-Id: I37ca660522b5a99666de2ea0b9c0aa8cd3732aca --- src/com/android/launcher3/allapps/AlphabeticalAppsList.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index ee2756f2c..43b56a4bb 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -362,6 +362,7 @@ public class AlphabeticalAppsList { for (int i = 0; i < size; ++i) { AppInfo info = apps.get(i); AdapterItem appItem = AdapterItem.asPredictedApp(i, "", info, i); + appItem.rowAppIndex = i; mAdapterItems.set(i, appItem); mFilteredApps.set(i, info); mAdapter.notifyItemChanged(i); -- cgit v1.2.3