Merge "Unifying multiple all-apps implementations" into tm-qpr-dev am: 09fab7ee7d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20713205

Change-Id: I1bd905e44924ec55f8f7cb254d66f9f751357590
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Sunny Goyal
2022-12-15 17:28:53 +00:00
committed by Automerger Merge Worker
18 changed files with 158 additions and 354 deletions
@@ -17,6 +17,7 @@ package com.android.launcher3.taskbar.allapps;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.WindowInsets;
import com.android.launcher3.DeviceProfile;
@@ -42,6 +43,19 @@ public class TaskbarAllAppsContainerView extends
return super.onApplyWindowInsets(insets);
}
@Override
protected View inflateSearchBox() {
// Remove top padding of header, since we do not have any search
mHeader.setPadding(mHeader.getPaddingLeft(), 0,
mHeader.getPaddingRight(), mHeader.getPaddingBottom());
TaskbarAllAppsFallbackSearchContainer searchView =
new TaskbarAllAppsFallbackSearchContainer(getContext(), null);
searchView.setId(R.id.search_container_all_apps);
searchView.setVisibility(GONE);
return searchView;
}
@Override
protected boolean isSearchSupported() {
return false;
@@ -53,4 +67,10 @@ public class TaskbarAllAppsContainerView extends
// TODO(b/240670050): Remove this and add header protection for the taskbar entrypoint.
mBottomSheetBackground.setBackgroundResource(R.drawable.bg_rounded_corner_bottom_sheet);
}
@Override
public boolean isInAllApps() {
// All apps is always open
return true;
}
}
@@ -21,9 +21,6 @@ import android.view.View;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.R;
import com.android.launcher3.allapps.ActivityAllAppsContainerView;
import com.android.launcher3.allapps.search.DefaultSearchAdapterProvider;
import com.android.launcher3.allapps.search.SearchAdapterProvider;
import com.android.launcher3.dot.DotInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.popup.PopupDataProvider;
@@ -137,10 +134,4 @@ public class TaskbarOverlayContext extends BaseTaskbarContext {
@Override
public void onPopupVisibilityChanged(boolean isVisible) {}
@Override
public SearchAdapterProvider<?> createSearchAdapterProvider(
ActivityAllAppsContainerView<?> appsView) {
return new DefaultSearchAdapterProvider(this);
}
}