mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
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:
@@ -83,6 +83,7 @@ import com.android.launcher3.shortcuts.ShortcutRequest;
|
||||
import com.android.launcher3.shortcuts.ShortcutRequest.QueryResult;
|
||||
import com.android.launcher3.util.ComponentKey;
|
||||
import com.android.launcher3.util.IOUtils;
|
||||
import com.android.launcher3.util.IntSet;
|
||||
import com.android.launcher3.util.LooperIdleLock;
|
||||
import com.android.launcher3.util.PackageManagerHelper;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
@@ -173,8 +174,9 @@ public class LoaderTask implements Runnable {
|
||||
ArrayList<ItemInfo> allItems = mBgDataModel.getAllWorkspaceItems();
|
||||
// Screen set is never empty
|
||||
final int firstScreen = mBgDataModel.collectWorkspaceScreens().get(0);
|
||||
// TODO(b/185515153): support two panel home.
|
||||
|
||||
filterCurrentWorkspaceItems(firstScreen, allItems, firstScreenItems,
|
||||
filterCurrentWorkspaceItems(IntSet.wrap(firstScreen), allItems, firstScreenItems,
|
||||
new ArrayList<>() /* otherScreenItems are ignored */);
|
||||
mFirstScreenBroadcast.sendBroadcasts(mApp.getContext(), firstScreenItems);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user