From 4f1e64c8e63155b903fbc9d8dfebad86d7d065c6 Mon Sep 17 00:00:00 2001 From: fbaron Date: Thu, 21 Nov 2024 13:12:26 -0800 Subject: [PATCH] Add logs for grid migration Bug: 364711064 Flag: com.android.launcher3.one_grid_specs Test: n/a it's just logs Change-Id: Icce21f507e07adfd954fd88634bdd7f0becf4a4c --- src/com/android/launcher3/model/GridSizeMigrationLogic.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/model/GridSizeMigrationLogic.kt b/src/com/android/launcher3/model/GridSizeMigrationLogic.kt index 3f52d8a73f..75fd31e08c 100644 --- a/src/com/android/launcher3/model/GridSizeMigrationLogic.kt +++ b/src/com/android/launcher3/model/GridSizeMigrationLogic.kt @@ -58,12 +58,17 @@ class GridSizeMigrationLogic { } val isFirstLoad = get(context).get(LauncherPrefs.IS_FIRST_LOAD_AFTER_RESTORE) - Log.d(TAG, "Begin grid migration. First load: $isFirstLoad") + Log.d( + TAG, + "Begin grid migration. First load: $isFirstLoad\n srcDeviceState: " + + "$srcDeviceState\ndestDeviceState: $destDeviceState\nisDestNewDb: $isDestNewDb", + ) // This is a special case where if the grid is the same amount of columns but a larger // amount of rows we simply copy over the source grid to the destination grid, rather // than undergoing the general grid migration. if (shouldMigrateToStrictlyTallerGrid(isDestNewDb, srcDeviceState, destDeviceState)) { + Log.d(TAG, "Migrating to strictly taller grid") copyTable(source, TABLE_NAME, target.writableDatabase, TABLE_NAME, context) if (oneGridSpecs()) { val destReader = DbReader(target.writableDatabase, TABLE_NAME, context)