diff options
author | Mario Bertschler <bmario@google.com> | 2017-05-05 20:09:40 +0000 |
---|---|---|
committer | Mario Bertschler <bmario@google.com> | 2017-05-05 20:09:40 +0000 |
commit | b3cbd7c87d743d978eb11404e1157c146c6fbc04 (patch) | |
tree | fbbc60cdbbefb6ecbd67e368b901461ebd83c744 /src/com/android/launcher3/allapps | |
parent | c0372a42a256421199e5d41592b69a6f4c2e9ef1 (diff) | |
download | android_packages_apps_Trebuchet-b3cbd7c87d743d978eb11404e1157c146c6fbc04.tar.gz android_packages_apps_Trebuchet-b3cbd7c87d743d978eb11404e1157c146c6fbc04.tar.bz2 android_packages_apps_Trebuchet-b3cbd7c87d743d978eb11404e1157c146c6fbc04.zip |
Revert "Adding suggested app as part of app discovery."
This reverts commit c0372a42a256421199e5d41592b69a6f4c2e9ef1.
Change-Id: Iebfb5bdbe042cb17f3d3657e0caa2fc7e9913ac6
Diffstat (limited to 'src/com/android/launcher3/allapps')
-rw-r--r-- | src/com/android/launcher3/allapps/AlphabeticalAppsList.java | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java index 79637197a..f291a80ee 100644 --- a/src/com/android/launcher3/allapps/AlphabeticalAppsList.java +++ b/src/com/android/launcher3/allapps/AlphabeticalAppsList.java @@ -183,10 +183,7 @@ public class AlphabeticalAppsList { private final List<ComponentKey> mPredictedAppComponents = new ArrayList<>(); // The set of predicted apps resolved from the component names and the current set of apps private final List<AppInfo> mPredictedApps = new ArrayList<>(); - // The set of apps returned from a discovery service while searching private final List<AppDiscoveryAppInfo> mDiscoveredApps = new ArrayList<>(); - // The suggested app returned by a discovery service - private AppDiscoveryAppInfo mSuggestedApp; // The of ordered component names as a result of a search query private ArrayList<ComponentKey> mSearchResults; @@ -291,9 +288,6 @@ public class AlphabeticalAppsList { @NonNull AppDiscoveryUpdateState state) { mAppDiscoveryUpdateState = state; switch (state) { - case SUGGESTED: - mSuggestedApp = app != null ? new AppDiscoveryAppInfo(app) : null; - break; case START: mDiscoveredApps.clear(); break; @@ -441,7 +435,6 @@ public class AlphabeticalAppsList { // Process the predicted app components mPredictedApps.clear(); if (mPredictedAppComponents != null && !mPredictedAppComponents.isEmpty() && !hasFilter()) { - int suggestedAppsCount = mSuggestedApp != null ? 1 : 0; for (ComponentKey ck : mPredictedAppComponents) { AppInfo info = mComponentToAppMap.get(ck); if (info != null) { @@ -452,16 +445,11 @@ public class AlphabeticalAppsList { } } // Stop at the number of predicted apps - if (mPredictedApps.size() + suggestedAppsCount == mNumPredictedAppsPerRow) { + if (mPredictedApps.size() == mNumPredictedAppsPerRow) { break; } } - if (mSuggestedApp != null) { - // adding suggested app as the last predicted app - mPredictedApps.add(mSuggestedApp); - } - if (!mPredictedApps.isEmpty()) { // Add a section for the predictions lastFastScrollerSectionInfo = new FastScrollSectionInfo(""); |