Reparent folders and app pairs
Previously, app pairs and folders shared a common data model, FolderInfo. Now we need to separate them, so a new type, CollectionInfo, will serve as the parent of both types. Bug: 315731527 Fixes: 326664798 Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD Test: Manual, unit tests to follow Change-Id: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
This commit is contained in:
@@ -31,7 +31,7 @@ import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.model.BgDataModel.Callbacks;
|
||||
import com.android.launcher3.model.data.AppInfo;
|
||||
import com.android.launcher3.model.data.FolderInfo;
|
||||
import com.android.launcher3.model.data.CollectionInfo;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.ItemInfoWithIcon;
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
||||
@@ -131,8 +131,8 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
|
||||
int screenId = coords[0];
|
||||
|
||||
ItemInfo itemInfo;
|
||||
if (item instanceof WorkspaceItemInfo || item instanceof FolderInfo ||
|
||||
item instanceof LauncherAppWidgetInfo) {
|
||||
if (item instanceof WorkspaceItemInfo || item instanceof CollectionInfo
|
||||
|| item instanceof LauncherAppWidgetInfo) {
|
||||
itemInfo = item;
|
||||
} else if (item instanceof WorkspaceItemFactory) {
|
||||
itemInfo = ((WorkspaceItemFactory) item).makeWorkspaceItem(app.getContext());
|
||||
|
||||
Reference in New Issue
Block a user