mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Merge "Setup infrastructure (multi-db support) for the new grid migration algorithm" into ub-launcher3-master
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.launcher3.model;
|
||||
import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_LOCKED_USER;
|
||||
import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SAFEMODE;
|
||||
import static com.android.launcher3.ItemInfoWithIcon.FLAG_DISABLED_SUSPENDED;
|
||||
import static com.android.launcher3.config.FeatureFlags.MULTI_DB_GRID_MIRATION_ALGO;
|
||||
import static com.android.launcher3.model.ModelUtils.filterCurrentWorkspaceItems;
|
||||
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
|
||||
import static com.android.launcher3.util.PackageManagerHelper.hasShortcutsPermission;
|
||||
@@ -318,7 +319,9 @@ public class LoaderTask implements Runnable {
|
||||
clearDb = true;
|
||||
}
|
||||
|
||||
if (!clearDb && !GridSizeMigrationTask.migrateGridIfNeeded(context)) {
|
||||
if (!clearDb && (MULTI_DB_GRID_MIRATION_ALGO.get()
|
||||
? !GridSizeMigrationTaskV2.migrateGridIfNeeded(context)
|
||||
: !GridSizeMigrationTask.migrateGridIfNeeded(context))) {
|
||||
// Migration failed. Clear workspace.
|
||||
clearDb = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user