Removing separate hotseat widget, instead using a QSB acroll all UI.
The QSB is responsible for updating its UI according to various states.
Bug: 109828640
Change-Id: Ic8cbf3d404d5870de0f6b8fe25a332b8d21bae20
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 3a38c0f..4090320 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -207,7 +207,6 @@
private final int[] mTmpAddItemCellCoordinates = new int[2];
@Thunk Hotseat mHotseat;
- @Nullable private View mHotseatSearchBox;
private DropTargetBar mDropTargetBar;
@@ -914,7 +913,6 @@
mWorkspace.initParentViews(mDragLayer);
mOverviewPanel = findViewById(R.id.overview_panel);
mHotseat = findViewById(R.id.hotseat);
- mHotseatSearchBox = findViewById(R.id.search_container_hotseat);
mLauncherView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
@@ -1159,10 +1157,6 @@
return mHotseat;
}
- public View getHotseatSearchBox() {
- return mHotseatSearchBox;
- }
-
public <T extends View> T getOverviewPanel() {
return (T) mOverviewPanel;
}
@@ -1654,23 +1648,15 @@
boolean isHotseatLayout(View layout) {
// TODO: Remove this method
- return mHotseat != null && layout != null &&
- (layout instanceof CellLayout) && (layout == mHotseat.getLayout());
+ return mHotseat != null && (layout == mHotseat);
}
/**
* Returns the CellLayout of the specified container at the specified screen.
*/
public CellLayout getCellLayout(int container, int screenId) {
- if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
- if (mHotseat != null) {
- return mHotseat.getLayout();
- } else {
- return null;
- }
- } else {
- return mWorkspace.getScreenWithId(screenId);
- }
+ return (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT)
+ ? mHotseat : mWorkspace.getScreenWithId(screenId);
}
@Override
@@ -2281,7 +2267,7 @@
}
writer.println(prefix + " Hotseat");
- ViewGroup layout = mHotseat.getLayout().getShortcutsAndWidgets();
+ ViewGroup layout = mHotseat.getShortcutsAndWidgets();
for (int j = 0; j < layout.getChildCount(); j++) {
Object tag = layout.getChildAt(j).getTag();
if (tag != null) {