mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Deprecate work folder
FIX: 73876183 Change-Id: I9d15df247eed3500c679cba085c680b75581cffb
This commit is contained in:
@@ -17,10 +17,7 @@ package com.android.launcher3.model;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.LauncherActivityInfo;
|
||||
import android.os.Process;
|
||||
import android.os.UserHandle;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.LongSparseArray;
|
||||
import android.util.Pair;
|
||||
import com.android.launcher3.AllAppsList;
|
||||
@@ -37,7 +34,6 @@ import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.ShortcutInfo;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.util.GridOccupancy;
|
||||
import com.android.launcher3.util.ManagedProfileHeuristic.UserFolderInfo;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -64,7 +60,6 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
|
||||
|
||||
final ArrayList<ItemInfo> addedItemsFinal = new ArrayList<>();
|
||||
final ArrayList<Long> addedWorkspaceScreensFinal = new ArrayList<>();
|
||||
ArrayMap<UserHandle, UserFolderInfo> userFolderMap = new ArrayMap<>();
|
||||
|
||||
// Get the list of workspace screens. We need to append to this list and
|
||||
// can not use sBgWorkspaceScreens because loadWorkspace() may not have been
|
||||
@@ -87,21 +82,6 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
|
||||
if (item instanceof AppInfo) {
|
||||
item = ((AppInfo) item).makeShortcut();
|
||||
}
|
||||
|
||||
if (!Process.myUserHandle().equals(item.user)) {
|
||||
// Check if this belongs to a work folder.
|
||||
if (!(entry.second instanceof LauncherActivityInfo)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
UserFolderInfo userFolderInfo = userFolderMap.get(item.user);
|
||||
if (userFolderInfo == null) {
|
||||
userFolderInfo = new UserFolderInfo(context, item.user, dataModel);
|
||||
userFolderMap.put(item.user, userFolderInfo);
|
||||
}
|
||||
item = userFolderInfo.convertToWorkspaceItem(
|
||||
(ShortcutInfo) item, (LauncherActivityInfo) entry.second);
|
||||
}
|
||||
}
|
||||
if (item != null) {
|
||||
filteredItems.add(item);
|
||||
@@ -160,10 +140,6 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (UserFolderInfo userFolderInfo : userFolderMap.values()) {
|
||||
userFolderInfo.applyPendingState(getModelWriter());
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateScreens(Context context, ArrayList<Long> workspaceScreens) {
|
||||
|
||||
Reference in New Issue
Block a user