Fixup! Launcher3: add support for hotseat qsb after A16
Change-Id: I99165fe31974f3ce4cfde67f43096d82eb4c3f8b
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/src/com/android/launcher3/model/WorkspaceItemSpaceFinder.java b/src/com/android/launcher3/model/WorkspaceItemSpaceFinder.java
index 9ed7a73..32bd5b4 100644
--- a/src/com/android/launcher3/model/WorkspaceItemSpaceFinder.java
+++ b/src/com/android/launcher3/model/WorkspaceItemSpaceFinder.java
@@ -18,12 +18,14 @@
import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET;
import static com.android.launcher3.WorkspaceLayoutManager.FIRST_SCREEN_ID;
+import android.content.Context;
import android.util.LongSparseArray;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.LauncherModel;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.config.FeatureFlags;
+import com.android.launcher3.dagger.ApplicationContext;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.GridOccupancy;
@@ -42,10 +44,15 @@
private BgDataModel mDataModel;
private InvariantDeviceProfile mIDP;
private LauncherModel mModel;
+ private final Context mContext;
@Inject
WorkspaceItemSpaceFinder(
- BgDataModel dataModel, InvariantDeviceProfile idp, LauncherModel model) {
+ @ApplicationContext Context context,
+ BgDataModel dataModel,
+ InvariantDeviceProfile idp,
+ LauncherModel model) {
+ mContext = context;
mDataModel = dataModel;
mIDP = idp;
mModel = model;
@@ -82,7 +89,7 @@
int screenCount = workspaceScreens.size();
// First check the preferred screen.
IntSet screensToExclude = new IntSet();
- if (Utilities.showWorkspaceQsbWidget(app.getContext())
+ if (Utilities.showWorkspaceQsbWidget(mContext)
&& !SHOULD_SHOW_FIRST_PAGE_WIDGET) {
screensToExclude.add(FIRST_SCREEN_ID);
}