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:
@@ -52,7 +52,7 @@ import com.android.launcher3.backup.BackupProtos.Screen;
|
||||
import com.android.launcher3.backup.BackupProtos.Widget;
|
||||
import com.android.launcher3.compat.UserHandleCompat;
|
||||
import com.android.launcher3.compat.UserManagerCompat;
|
||||
import com.android.launcher3.model.MigrateFromRestoreTask;
|
||||
import com.android.launcher3.model.GridSizeMigrationTask;
|
||||
import com.android.launcher3.util.Thunk;
|
||||
import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
|
||||
import com.google.protobuf.nano.MessageNano;
|
||||
@@ -315,7 +315,7 @@ public class LauncherBackupHelper implements BackupHelper {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (MigrateFromRestoreTask.ENABLED &&
|
||||
if (GridSizeMigrationTask.ENABLED &&
|
||||
(oldProfile.desktopCols - currentProfile.desktopCols <= 1) &&
|
||||
(oldProfile.desktopRows - currentProfile.desktopRows <= 1)) {
|
||||
// Allow desktop migration when row and/or column count contracts by 1.
|
||||
|
||||
Reference in New Issue
Block a user