summaryrefslogtreecommitdiff
path: root/src/com/android/launcher3/model/BaseLauncherBinder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/model/BaseLauncherBinder.java')
-rw-r--r--src/com/android/launcher3/model/BaseLauncherBinder.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/com/android/launcher3/model/BaseLauncherBinder.java b/src/com/android/launcher3/model/BaseLauncherBinder.java
index dbb29b8864..9b2344d2ad 100644
--- a/src/com/android/launcher3/model/BaseLauncherBinder.java
+++ b/src/com/android/launcher3/model/BaseLauncherBinder.java
@@ -16,6 +16,7 @@
package com.android.launcher3.model;
+import static com.android.launcher3.config.FeatureFlags.ENABLE_SMARTSPACE_REMOVAL;
import static com.android.launcher3.model.ItemInstallQueue.FLAG_LOADER_RUNNING;
import static com.android.launcher3.model.ModelUtils.filterCurrentWorkspaceItems;
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
@@ -172,6 +173,11 @@ public abstract class BaseLauncherBinder {
public abstract void bindWidgets();
/**
+ * bindWidgets is abstract because it is a no-op for the go launcher.
+ */
+ public abstract void bindSmartspaceWidget();
+
+ /**
* Sorts the set of items by hotseat, workspace (spatially from top to bottom, left to right)
*/
protected void sortWorkspaceItemsSpatially(InvariantDeviceProfile profile,
@@ -288,6 +294,10 @@ public abstract class BaseLauncherBinder {
executeCallbacksTask(c -> {
c.clearPendingBinds();
c.startBinding();
+ if (ENABLE_SMARTSPACE_REMOVAL.get()) {
+ c.setIsFirstPagePinnedItemEnabled(
+ mBgDataModel.isFirstPagePinnedItemEnabled);
+ }
}, mUiExecutor);
// Bind workspace screens
@@ -305,6 +315,10 @@ public abstract class BaseLauncherBinder {
Executor pendingExecutor = pendingTasks::add;
bindWorkspaceItems(otherWorkspaceItems, pendingExecutor);
bindAppWidgets(otherAppWidgets, pendingExecutor);
+
+ StringCache cacheClone = mBgDataModel.stringCache.clone();
+ executeCallbacksTask(c -> c.bindStringCache(cacheClone), pendingExecutor);
+
executeCallbacksTask(c -> c.finishBindingItems(currentScreenIds), pendingExecutor);
pendingExecutor.execute(
() -> {
@@ -319,9 +333,6 @@ public abstract class BaseLauncherBinder {
c.onInitialBindComplete(
currentScreenIds, pendingTasks, workspaceItemCount, isBindSync);
}, mUiExecutor);
-
- StringCache cacheClone = mBgDataModel.stringCache.clone();
- executeCallbacksTask(c -> c.bindStringCache(cacheClone), pendingExecutor);
}
private void bindWorkspaceItems(