Loading src/com/android/launcher3/LauncherProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -162,7 +162,7 @@ public class LauncherProvider extends ContentProvider { private synchronized boolean prepForMigration(String dbFile, String targetTableName, Supplier<DatabaseHelper> src, Supplier<DatabaseHelper> dst) { if (TextUtils.equals(dbFile, mOpenHelper.getDatabaseName())) { Log.e("b/198965093", "prepForMigration - target db is same as current: " + dbFile); Log.e(TAG, "prepForMigration - target db is same as current: " + dbFile); return false; } Loading src/com/android/launcher3/model/GridSizeMigrationTaskV2.java +1 −2 Original line number Diff line number Diff line Loading @@ -110,9 +110,8 @@ public class GridSizeMigrationTaskV2 { private static boolean needsToMigrate( DeviceGridState srcDeviceState, DeviceGridState destDeviceState) { boolean needsToMigrate = !destDeviceState.isCompatible(srcDeviceState); // TODO(b/198965093): Revert this change after bug is fixed if (needsToMigrate) { Log.d("b/198965093", "Migration is needed. destDeviceState: " + destDeviceState Log.i(TAG, "Migration is needed. destDeviceState: " + destDeviceState + ", srcDeviceState: " + srcDeviceState); } return needsToMigrate; Loading src/com/android/launcher3/util/DisplayController.java +13 −18 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import java.util.Set; public class DisplayController implements ComponentCallbacks, SafeCloseable { private static final String TAG = "DisplayController"; private static final boolean DEBUG = false; public static final MainThreadInitializedObject<DisplayController> INSTANCE = new MainThreadInitializedObject<>(DisplayController::new); Loading Loading @@ -243,10 +244,9 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { || !newInfo.mPerDisplayBounds.equals(oldInfo.mPerDisplayBounds)) { change |= CHANGE_SUPPORTED_BOUNDS; } Log.d("b/198965093", "handleInfoChange" + "\n\tchange: 0b" + Integer.toBinaryString(change) + "\n\tConfiguration diff: 0x" + Integer.toHexString( newInfo.mConfiguration.diff(oldInfo.mConfiguration))); if (DEBUG) { Log.d(TAG, "handleInfoChange - change: 0b" + Integer.toBinaryString(change)); } if (change != 0) { mInfo = newInfo; Loading Loading @@ -286,9 +286,6 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { private final ArrayMap<CachedDisplayInfo, WindowBounds[]> mPerDisplayBounds = new ArrayMap<>(); // TODO(b/198965093): Remove after investigation private Configuration mConfiguration; public Info(Context displayInfoContext) { /* don't need system overrides for external displays */ this(displayInfoContext, new WindowManagerProxy(), new ArrayMap<>()); Loading @@ -310,21 +307,18 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { mScreenSizeDp = new PortraitSize(config.screenHeightDp, config.screenWidthDp); navigationMode = parseNavigationMode(displayInfoContext); // TODO(b/198965093): Remove after investigation mConfiguration = config; mPerDisplayBounds.putAll(perDisplayBoundsCache); WindowBounds[] cachedValue = mPerDisplayBounds.get(normalizedDisplayInfo); WindowBounds realBounds = wmProxy.getRealBounds(displayInfoContext, displayInfo); if (cachedValue == null) { // Unexpected normalizedDisplayInfo is found, recreate the cache Log.e("b/198965093", "Unexpected normalizedDisplayInfo found, invalidating cache"); Log.e(TAG, "Unexpected normalizedDisplayInfo found, invalidating cache"); mPerDisplayBounds.clear(); mPerDisplayBounds.putAll(wmProxy.estimateInternalDisplayBounds(displayInfoContext)); cachedValue = mPerDisplayBounds.get(normalizedDisplayInfo); if (cachedValue == null) { Log.e("b/198965093", "normalizedDisplayInfo not found in estimation: " Log.e(TAG, "normalizedDisplayInfo not found in estimation: " + normalizedDisplayInfo); supportedBounds.add(realBounds); } Loading @@ -342,13 +336,14 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { } mPerDisplayBounds.values().forEach( windowBounds -> Collections.addAll(supportedBounds, windowBounds)); Log.e("b/198965093", "mConfiguration: " + mConfiguration); Log.d("b/198965093", "displayInfo: " + displayInfo); Log.d("b/198965093", "realBounds: " + realBounds); Log.d("b/198965093", "normalizedDisplayInfo: " + normalizedDisplayInfo); mPerDisplayBounds.forEach((key, value) -> Log.d("b/198965093", if (DEBUG) { Log.d(TAG, "displayInfo: " + displayInfo); Log.d(TAG, "realBounds: " + realBounds); Log.d(TAG, "normalizedDisplayInfo: " + normalizedDisplayInfo); mPerDisplayBounds.forEach((key, value) -> Log.d(TAG, "perDisplayBounds - " + key + ": " + Arrays.deepToString(value))); } } /** * Returns {@code true} if the bounds represent a tablet. Loading Loading
src/com/android/launcher3/LauncherProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -162,7 +162,7 @@ public class LauncherProvider extends ContentProvider { private synchronized boolean prepForMigration(String dbFile, String targetTableName, Supplier<DatabaseHelper> src, Supplier<DatabaseHelper> dst) { if (TextUtils.equals(dbFile, mOpenHelper.getDatabaseName())) { Log.e("b/198965093", "prepForMigration - target db is same as current: " + dbFile); Log.e(TAG, "prepForMigration - target db is same as current: " + dbFile); return false; } Loading
src/com/android/launcher3/model/GridSizeMigrationTaskV2.java +1 −2 Original line number Diff line number Diff line Loading @@ -110,9 +110,8 @@ public class GridSizeMigrationTaskV2 { private static boolean needsToMigrate( DeviceGridState srcDeviceState, DeviceGridState destDeviceState) { boolean needsToMigrate = !destDeviceState.isCompatible(srcDeviceState); // TODO(b/198965093): Revert this change after bug is fixed if (needsToMigrate) { Log.d("b/198965093", "Migration is needed. destDeviceState: " + destDeviceState Log.i(TAG, "Migration is needed. destDeviceState: " + destDeviceState + ", srcDeviceState: " + srcDeviceState); } return needsToMigrate; Loading
src/com/android/launcher3/util/DisplayController.java +13 −18 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import java.util.Set; public class DisplayController implements ComponentCallbacks, SafeCloseable { private static final String TAG = "DisplayController"; private static final boolean DEBUG = false; public static final MainThreadInitializedObject<DisplayController> INSTANCE = new MainThreadInitializedObject<>(DisplayController::new); Loading Loading @@ -243,10 +244,9 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { || !newInfo.mPerDisplayBounds.equals(oldInfo.mPerDisplayBounds)) { change |= CHANGE_SUPPORTED_BOUNDS; } Log.d("b/198965093", "handleInfoChange" + "\n\tchange: 0b" + Integer.toBinaryString(change) + "\n\tConfiguration diff: 0x" + Integer.toHexString( newInfo.mConfiguration.diff(oldInfo.mConfiguration))); if (DEBUG) { Log.d(TAG, "handleInfoChange - change: 0b" + Integer.toBinaryString(change)); } if (change != 0) { mInfo = newInfo; Loading Loading @@ -286,9 +286,6 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { private final ArrayMap<CachedDisplayInfo, WindowBounds[]> mPerDisplayBounds = new ArrayMap<>(); // TODO(b/198965093): Remove after investigation private Configuration mConfiguration; public Info(Context displayInfoContext) { /* don't need system overrides for external displays */ this(displayInfoContext, new WindowManagerProxy(), new ArrayMap<>()); Loading @@ -310,21 +307,18 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { mScreenSizeDp = new PortraitSize(config.screenHeightDp, config.screenWidthDp); navigationMode = parseNavigationMode(displayInfoContext); // TODO(b/198965093): Remove after investigation mConfiguration = config; mPerDisplayBounds.putAll(perDisplayBoundsCache); WindowBounds[] cachedValue = mPerDisplayBounds.get(normalizedDisplayInfo); WindowBounds realBounds = wmProxy.getRealBounds(displayInfoContext, displayInfo); if (cachedValue == null) { // Unexpected normalizedDisplayInfo is found, recreate the cache Log.e("b/198965093", "Unexpected normalizedDisplayInfo found, invalidating cache"); Log.e(TAG, "Unexpected normalizedDisplayInfo found, invalidating cache"); mPerDisplayBounds.clear(); mPerDisplayBounds.putAll(wmProxy.estimateInternalDisplayBounds(displayInfoContext)); cachedValue = mPerDisplayBounds.get(normalizedDisplayInfo); if (cachedValue == null) { Log.e("b/198965093", "normalizedDisplayInfo not found in estimation: " Log.e(TAG, "normalizedDisplayInfo not found in estimation: " + normalizedDisplayInfo); supportedBounds.add(realBounds); } Loading @@ -342,13 +336,14 @@ public class DisplayController implements ComponentCallbacks, SafeCloseable { } mPerDisplayBounds.values().forEach( windowBounds -> Collections.addAll(supportedBounds, windowBounds)); Log.e("b/198965093", "mConfiguration: " + mConfiguration); Log.d("b/198965093", "displayInfo: " + displayInfo); Log.d("b/198965093", "realBounds: " + realBounds); Log.d("b/198965093", "normalizedDisplayInfo: " + normalizedDisplayInfo); mPerDisplayBounds.forEach((key, value) -> Log.d("b/198965093", if (DEBUG) { Log.d(TAG, "displayInfo: " + displayInfo); Log.d(TAG, "realBounds: " + realBounds); Log.d(TAG, "normalizedDisplayInfo: " + normalizedDisplayInfo); mPerDisplayBounds.forEach((key, value) -> Log.d(TAG, "perDisplayBounds - " + key + ": " + Arrays.deepToString(value))); } } /** * Returns {@code true} if the bounds represent a tablet. Loading