Adding support for storing container based item list in the model

These items get updated automatically during various model tasks.
Also simplifying the pinned shortcut state, by calculating the
list of ppined shortcut on demand, instead of storing a refCount.

Bug: 160748731
Change-Id: I3169d293552b05b4f4d6c529397fbc761887a282
This commit is contained in:
Sunny Goyal committed 2020-07-23 15:27:50 -07:00
1 parent 5ab7171b9a
commit 28f5075eb0
7 files changed
+163 -72

No files matched your search

+2 -1
View File
@@ -115,6 +115,7 @@ import com.android.systemui.plugins.shared.LauncherOverlayManager.LauncherOverla
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.function.Predicate;
/**
@@ -3087,7 +3088,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
return false;
}
void updateShortcuts(ArrayList<WorkspaceItemInfo> shortcuts) {
void updateShortcuts(List<WorkspaceItemInfo> shortcuts) {
final HashSet<WorkspaceItemInfo> updates = new HashSet<>(shortcuts);
ItemOperator op = (info, v) -> {
if (v instanceof BubbleTextView && updates.contains(info)) {