Adding support for migrating the grid between any two valid screens sizes.
The grid is migrated in steps where each step consists of at max one column change and at max one row change.
Adding some unit tests for GridMigrationLogic
Bug: 25958224
Change-Id: Ie54e872ea0925cc4c463edbba0a7201d62b373a0
diff --git a/src/com/android/launcher3/LauncherBackupAgentHelper.java b/src/com/android/launcher3/LauncherBackupAgentHelper.java
index bf9c668..b192ba3 100644
--- a/src/com/android/launcher3/LauncherBackupAgentHelper.java
+++ b/src/com/android/launcher3/LauncherBackupAgentHelper.java
@@ -101,12 +101,9 @@
LauncherSettings.Settings.METHOD_UPDATE_FOLDER_ITEMS_RANK);
}
- // 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);
+ mHelper.widgetSizes, mHelper.migrationCompatibleProfileData);
}
LauncherSettings.Settings.call(getContentResolver(),