mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Extending the grid migration logic to handle density changes
For hotseat migratino, we simply drop the items with least weight If the workspace row/column decreases by 2 or more, we clear the whole workspace Bug: 25958224 Change-Id: I7131b955023d185ed10955f593184b9238546dc8
This commit is contained in:
@@ -24,7 +24,7 @@ import android.database.Cursor;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.launcher3.model.MigrateFromRestoreTask;
|
||||
import com.android.launcher3.model.GridSizeMigrationTask;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -101,8 +101,9 @@ public class LauncherBackupAgentHelper extends BackupAgentHelper {
|
||||
LauncherSettings.Settings.METHOD_UPDATE_FOLDER_ITEMS_RANK);
|
||||
}
|
||||
|
||||
if (MigrateFromRestoreTask.ENABLED && mHelper.shouldAttemptWorkspaceMigration()) {
|
||||
MigrateFromRestoreTask.markForMigration(getApplicationContext(),
|
||||
// TODO: Update this logic to handle grid difference of 2. as well as hotseat difference
|
||||
if (GridSizeMigrationTask.ENABLED && mHelper.shouldAttemptWorkspaceMigration()) {
|
||||
GridSizeMigrationTask.markForMigration(getApplicationContext(),
|
||||
(int) mHelper.migrationCompatibleProfileData.desktopCols,
|
||||
(int) mHelper.migrationCompatibleProfileData.desktopRows,
|
||||
mHelper.widgetSizes);
|
||||
|
||||
Reference in New Issue
Block a user