Add two panel home support for page binding logic
There's a logic which prioritizes the binding for the current page and defers the other pages' binding. If two panel home is enabled, we want to bind both pages together. LauncherPageRestoreHelper has been created to contain the logic for persisting restoring and calculating which pages to load immediately. Test: manual + run LauncherPageRestoreHelperTest robo test Bug: 174464691 Change-Id: I57ac3f7150303b95b272e922f44bda26f9d5ce2a
This commit is contained in:
1 parent
f3649f5e98
commit
55edfe55f7
17 files changed
+499
-85
No files matched your search
@@ -51,7 +51,8 @@ public class ModelUtils {
|
||||
* Filters the set of items who are directly or indirectly (via another container) on the
|
||||
* specified screen.
|
||||
*/
|
||||
public static <T extends ItemInfo> void filterCurrentWorkspaceItems(int currentScreenId,
|
||||
public static <T extends ItemInfo> void filterCurrentWorkspaceItems(
|
||||
IntSet currentScreenIds,
|
||||
ArrayList<T> allWorkspaceItems,
|
||||
ArrayList<T> currentScreenItems,
|
||||
ArrayList<T> otherScreenItems) {
|
||||
@@ -65,7 +66,7 @@ public class ModelUtils {
|
||||
(lhs, rhs) -> Integer.compare(lhs.container, rhs.container));
|
||||
for (T info : allWorkspaceItems) {
|
||||
if (info.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
|
||||
if (info.screenId == currentScreenId) {
|
||||
if (currentScreenIds.contains(info.screenId)) {
|
||||
currentScreenItems.add(info);
|
||||
itemsOnScreen.add(info.id);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user