Revert "Refactors Search results into separate RV for Toast."
This reverts commit 6729f0b950.
Reason for revert: This change caused b/230648542.
Please see https://b.corp.google.com/issues/230648542#comment5 for the video after reverting this change.
Bug: 206905515
Bug: 230648542
Change-Id: I85f063c56cad137c05b810204244bba7e8f94ee7
This commit is contained in:
1 parent
6729f0b950
commit
5cc7ff0990
21 files changed
+146
-300
No files matched your search
@@ -57,7 +57,7 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
private final AllAppsSearchBarController mSearchBarController;
|
||||
private final SpannableStringBuilder mSearchQueryBuilder;
|
||||
|
||||
private AlphabeticalAppsList<?> mSearchResultsList;
|
||||
private AlphabeticalAppsList<?> mApps;
|
||||
private ActivityAllAppsContainerView<?> mAppsView;
|
||||
|
||||
// The amount of pixels to shift down and overlap with the rest of the content.
|
||||
@@ -102,8 +102,8 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
// Update the width to match the grid padding
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
int myRequestedWidth = getSize(widthMeasureSpec);
|
||||
int rowWidth = myRequestedWidth - mAppsView.getActiveAppsRecyclerView().getPaddingLeft()
|
||||
- mAppsView.getActiveAppsRecyclerView().getPaddingRight();
|
||||
int rowWidth = myRequestedWidth - mAppsView.getActiveRecyclerView().getPaddingLeft()
|
||||
- mAppsView.getActiveRecyclerView().getPaddingRight();
|
||||
|
||||
int cellWidth = DeviceProfile.calculateCellWidth(rowWidth,
|
||||
dp.cellLayoutBorderSpacePx.x, dp.numShownHotseatIcons);
|
||||
@@ -131,7 +131,7 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
|
||||
@Override
|
||||
public void initializeSearch(ActivityAllAppsContainerView<?> appsView) {
|
||||
mSearchResultsList = appsView.getSearchResultList();
|
||||
mApps = appsView.getApps();
|
||||
mAppsView = appsView;
|
||||
mSearchBarController.initialize(
|
||||
new DefaultAppSearchAlgorithm(getContext()),
|
||||
@@ -170,7 +170,7 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
@Override
|
||||
public void onSearchResult(String query, ArrayList<AdapterItem> items) {
|
||||
if (items != null) {
|
||||
mSearchResultsList.setSearchResults(items);
|
||||
mApps.setSearchResults(items);
|
||||
notifyResultChanged();
|
||||
mAppsView.setLastSearchQuery(query);
|
||||
}
|
||||
@@ -179,14 +179,14 @@ public class AppsSearchContainerLayout extends ExtendedEditText
|
||||
@Override
|
||||
public void onAppendSearchResult(String query, ArrayList<AdapterItem> items) {
|
||||
if (items != null) {
|
||||
mSearchResultsList.appendSearchResults(items);
|
||||
mApps.appendSearchResults(items);
|
||||
notifyResultChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearSearchResult() {
|
||||
if (mSearchResultsList.setSearchResults(null)) {
|
||||
if (mApps.setSearchResults(null)) {
|
||||
notifyResultChanged();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user