Migrate AllAppsSearch [part 1/3]
[Video attached to bug report] Setup DeviceSearchAlgorithm to handle on device search Bug: 161801950 Test: Manual Change-Id: Ib55f415f9992ceab687bbbfe904d153157541648
This commit is contained in:
1 parent
0e649985e7
commit
df10ff46bd
11 files changed
+267
-80
No files matched your search
@@ -38,13 +38,13 @@ import com.android.launcher3.BaseDraggingActivity;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.ExtendedEditText;
|
||||
import com.android.launcher3.Insettable;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.allapps.AllAppsContainerView;
|
||||
import com.android.launcher3.allapps.AllAppsStore;
|
||||
import com.android.launcher3.allapps.AlphabeticalAppsList;
|
||||
import com.android.launcher3.allapps.SearchUiManager;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.util.ComponentKey;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -135,7 +135,8 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
mApps = appsView.getApps();
|
||||
mAppsView = appsView;
|
||||
mSearchBarController.initialize(
|
||||
new DefaultAppSearchAlgorithm(mApps.getApps()), this, mLauncher, this);
|
||||
new DefaultAppSearchAlgorithm(LauncherAppState.getInstance(mLauncher)), this,
|
||||
mLauncher, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -168,9 +169,9 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSearchResult(String query, ArrayList<ComponentKey> apps) {
|
||||
if (apps != null) {
|
||||
mApps.setOrderedFilter(apps);
|
||||
public void onSearchResult(String query, ArrayList<AlphabeticalAppsList.AdapterItem> items) {
|
||||
if (items != null) {
|
||||
mApps.setSearchResults(items);
|
||||
notifyResultChanged();
|
||||
mAppsView.setLastSearchQuery(query);
|
||||
}
|
||||
@@ -178,7 +179,7 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
|
||||
@Override
|
||||
public void clearSearchResult() {
|
||||
if (mApps.setOrderedFilter(null)) {
|
||||
if (mApps.setSearchResults(null)) {
|
||||
notifyResultChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user