diff options
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java b/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java index a1ff8223a..7d70a3e96 100644 --- a/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java +++ b/src/com/android/launcher3/allapps/AllAppsFastScrollHelper.java @@ -210,7 +210,9 @@ public class AllAppsFastScrollHelper implements AllAppsGridAdapter.BindViewCallb for (RecyclerView.ViewHolder viewHolder : mTrackedFastScrollViews) { int pos = viewHolder.getAdapterPosition(); boolean isActive = false; - if (mCurrentFastScrollSection != null && pos > -1) { + if (mCurrentFastScrollSection != null + && pos > RecyclerView.NO_POSITION + && pos < mApps.getAdapterItems().size()) { AlphabeticalAppsList.AdapterItem item = mApps.getAdapterItems().get(pos); isActive = item != null && mCurrentFastScrollSection.equals(item.sectionName) && |