From 3c4c975d749b3f8148f01272a7adda37841052af Mon Sep 17 00:00:00 2001 From: fbaron Date: Mon, 9 Sep 2024 11:05:15 -0700 Subject: [PATCH] Add logs for 4x4 to 4x5 missing row bug Flag: EXEMPT adding logs Test: EXEMPT adding logs Bug: 360462379 Change-Id: Icb56209a4a12c935dd97bd01d53b8fb6e4371c34 --- .../android/launcher3/model/GridSizeMigrationUtil.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/launcher3/model/GridSizeMigrationUtil.java b/src/com/android/launcher3/model/GridSizeMigrationUtil.java index f54fc57037..8d2a7f92d4 100644 --- a/src/com/android/launcher3/model/GridSizeMigrationUtil.java +++ b/src/com/android/launcher3/model/GridSizeMigrationUtil.java @@ -121,13 +121,21 @@ public class GridSizeMigrationUtil { @NonNull DeviceGridState destDeviceState, @NonNull DatabaseHelper target, @NonNull SQLiteDatabase source) { + + Log.i("b/360462379", "Going from " + srcDeviceState.getColumns() + "x" + + srcDeviceState.getRows()); + Log.i("b/360462379", "Going to " + destDeviceState.getColumns() + "x" + + destDeviceState.getRows()); + if (!needsToMigrate(srcDeviceState, destDeviceState)) { + Log.i("b/360462379", "Does not need to migrate."); return true; } if (Flags.enableGridMigrationFix() && srcDeviceState.getColumns().equals(destDeviceState.getColumns()) && srcDeviceState.getRows() < destDeviceState.getRows()) { + Log.i("b/360462379", "Grid migration fix entry point."); // Only use this strategy when comparing the previous grid to the new grid and the // columns are the same and the destination has more rows copyTable(source, TABLE_NAME, target.getWritableDatabase(), TABLE_NAME, context);