Loading src/com/android/launcher3/LauncherBackupAgentHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ public class LauncherBackupAgentHelper extends BackupAgentHelper { LauncherAppState.getLauncherProvider().updateFolderItemsRank(); } if (mHelper.shouldAttemptWorkspaceMigration()) { if (MigrateFromRestoreTask.ENABLED && mHelper.shouldAttemptWorkspaceMigration()) { MigrateFromRestoreTask.markForMigration(getApplicationContext(), (int) mHelper.migrationCompatibleProfileData.desktopCols, (int) mHelper.migrationCompatibleProfileData.desktopRows, Loading src/com/android/launcher3/LauncherBackupHelper.java +3 −1 Original line number Diff line number Diff line Loading @@ -52,6 +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.util.Thunk; import com.google.protobuf.nano.InvalidProtocolBufferNanoException; import com.google.protobuf.nano.MessageNano; Loading Loading @@ -314,7 +315,8 @@ public class LauncherBackupHelper implements BackupHelper { return true; } if ((oldProfile.desktopCols - currentProfile.desktopCols <= 1) && if (MigrateFromRestoreTask.ENABLED && (oldProfile.desktopCols - currentProfile.desktopCols <= 1) && (oldProfile.desktopRows - currentProfile.desktopRows <= 1)) { // Allow desktop migration when row and/or column count contracts by 1. Loading src/com/android/launcher3/LauncherModel.java +1 −2 Original line number Diff line number Diff line Loading @@ -1758,8 +1758,7 @@ public class LauncherModel extends BroadcastReceiver int countX = (int) profile.numColumns; int countY = (int) profile.numRows; if (MigrateFromRestoreTask.shouldRunTask(mContext)) { if (MigrateFromRestoreTask.ENABLED && MigrateFromRestoreTask.shouldRunTask(mContext)) { long migrationStartTime = System.currentTimeMillis(); Log.v(TAG, "Starting workspace migration after restore"); try { Loading src/com/android/launcher3/model/MigrateFromRestoreTask.java +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ import java.util.HashSet; */ public class MigrateFromRestoreTask { public static boolean ENABLED = false; private static final String TAG = "MigrateFromRestoreTask"; private static final boolean DEBUG = true; Loading Loading
src/com/android/launcher3/LauncherBackupAgentHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ public class LauncherBackupAgentHelper extends BackupAgentHelper { LauncherAppState.getLauncherProvider().updateFolderItemsRank(); } if (mHelper.shouldAttemptWorkspaceMigration()) { if (MigrateFromRestoreTask.ENABLED && mHelper.shouldAttemptWorkspaceMigration()) { MigrateFromRestoreTask.markForMigration(getApplicationContext(), (int) mHelper.migrationCompatibleProfileData.desktopCols, (int) mHelper.migrationCompatibleProfileData.desktopRows, Loading
src/com/android/launcher3/LauncherBackupHelper.java +3 −1 Original line number Diff line number Diff line Loading @@ -52,6 +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.util.Thunk; import com.google.protobuf.nano.InvalidProtocolBufferNanoException; import com.google.protobuf.nano.MessageNano; Loading Loading @@ -314,7 +315,8 @@ public class LauncherBackupHelper implements BackupHelper { return true; } if ((oldProfile.desktopCols - currentProfile.desktopCols <= 1) && if (MigrateFromRestoreTask.ENABLED && (oldProfile.desktopCols - currentProfile.desktopCols <= 1) && (oldProfile.desktopRows - currentProfile.desktopRows <= 1)) { // Allow desktop migration when row and/or column count contracts by 1. Loading
src/com/android/launcher3/LauncherModel.java +1 −2 Original line number Diff line number Diff line Loading @@ -1758,8 +1758,7 @@ public class LauncherModel extends BroadcastReceiver int countX = (int) profile.numColumns; int countY = (int) profile.numRows; if (MigrateFromRestoreTask.shouldRunTask(mContext)) { if (MigrateFromRestoreTask.ENABLED && MigrateFromRestoreTask.shouldRunTask(mContext)) { long migrationStartTime = System.currentTimeMillis(); Log.v(TAG, "Starting workspace migration after restore"); try { Loading
src/com/android/launcher3/model/MigrateFromRestoreTask.java +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ import java.util.HashSet; */ public class MigrateFromRestoreTask { public static boolean ENABLED = false; private static final String TAG = "MigrateFromRestoreTask"; private static final boolean DEBUG = true; Loading