From 1739c5c68e7c821037e4a5aa2a68be7fe6c222bc Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Mon, 22 Feb 2021 00:22:07 -0800 Subject: [PATCH] When in search mode, do not refresh rescycler view, on package update Bug: 180570580 Test: manual TL;DR;; when new app install happens in search mode, no reset when new app install happens in a-z mode, recycler view refreshes Change-Id: I8a6bf327ecd3dbef4837eca560f10016731b78e0 --- .../launcher3/allapps/AllAppsSectionDecorator.java | 2 +- .../android/launcher3/allapps/AlphabeticalAppsList.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/android/launcher3/allapps/AllAppsSectionDecorator.java b/src/com/android/launcher3/allapps/AllAppsSectionDecorator.java index 176dce6c84..9328a3d6e9 100644 --- a/src/com/android/launcher3/allapps/AllAppsSectionDecorator.java +++ b/src/com/android/launcher3/allapps/AllAppsSectionDecorator.java @@ -129,7 +129,7 @@ public class AllAppsSectionDecorator extends RecyclerView.ItemDecoration { mIsFullWidth = isFullWidth; int endScrim = Themes.getColorBackground(context); mFillcolor = ColorUtils.setAlphaComponent(endScrim, fillAlpha); - mFocusColor = ColorUtils.setAlphaComponent(endScrim, fillAlpha); + mFocusColor = endScrim; mIsTopRound = isTopRound; mIsBottomRound = isBottomRound; diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index 123ace7938..fefd97ad3f 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -185,7 +185,7 @@ public class AlphabeticalAppsList implements AllAppsStore.OnUpdateListener { if (results == null || mSearchResults != results) { boolean same = mSearchResults != null && mSearchResults.equals(results); mSearchResults = results; - onAppsUpdated(); + updateAdapterItems(); return !same; } return false; @@ -257,11 +257,13 @@ public class AlphabeticalAppsList implements AllAppsStore.OnUpdateListener { } // Recompose the set of adapter items from the current set of apps - updateAdapterItems(); + if (mSearchResults == null) { + updateAdapterItems(); + } } /** - * Updates the set of filtered apps with the current filter. At this point, we expect + * Updates the set of filtered apps with the current filter. At this point, we expect * mCachedSectionNames to have been calculated for the set of all apps in mApps. */ private void updateAdapterItems() {