From d2706823cb91a72b2e57421cdd4669e23ee1a1b4 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Mon, 19 Dec 2022 18:36:14 +0000 Subject: [PATCH] Add logs to track app grid changes Bug: 258560494 Test: manual Change-Id: I2c44fbc2ce25b61df15853c4789bf0d6321793bb --- src/com/android/launcher3/InvariantDeviceProfile.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java index ffe81ad2aa..a4020f9cab 100644 --- a/src/com/android/launcher3/InvariantDeviceProfile.java +++ b/src/com/android/launcher3/InvariantDeviceProfile.java @@ -206,6 +206,8 @@ public class InvariantDeviceProfile { if (!newGridName.equals(gridName)) { LauncherPrefs.getPrefs(context).edit().putString(KEY_IDP_GRID_NAME, newGridName) .apply(); + Log.d("b/258560494", "InvariantDeviceProfile - setting newGridName: " + newGridName + + ", gridName: " + gridName); } new DeviceGridState(this).writeToPrefs(context); @@ -453,6 +455,7 @@ public class InvariantDeviceProfile { public void setCurrentGrid(Context context, String gridName) { Context appContext = context.getApplicationContext(); LauncherPrefs.getPrefs(appContext).edit().putString(KEY_IDP_GRID_NAME, gridName).apply(); + Log.d("b/258560494", "setCurrentGrid: " + gridName); MAIN_EXECUTOR.execute(() -> onConfigChanged(appContext)); } @@ -517,6 +520,10 @@ public class InvariantDeviceProfile { } } if (filteredProfiles.isEmpty()) { + if (gridName != null) { + Log.d("b/258560494", "No matching grid from for gridName: " + gridName + + ", deviceType: " + deviceType); + } // No grid found, use the default options for (DisplayOption option : profiles) { if (option.canBeDefault) {