Add logs to check if onLayout is ever not called.
Bug: 349929393
Test: Verified locally that the logs are shown in a bugreport.
Flag: EXEMPT logs
Change-Id: Ie5b759a2616456db9e232efcb0cfd21fdd4cc291
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 6c706be..c2df1a2 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2701,6 +2701,20 @@
writer.println(prefix + "\tmAppWidgetHolder.isListening: "
+ mAppWidgetHolder.isListening());
+ // b/349929393
+ // The only way to reproduce this bug is to ensure that onLayout never gets called. This
+ // theoretically is impossible, so these logs are being added to test if that actually is
+ // what is happening.
+ writer.println(prefix + "\tmWorkspace.mHasOnLayoutBeenCalled="
+ + mWorkspace.mHasOnLayoutBeenCalled);
+ for (int i = 0; i < mWorkspace.getPageCount(); i++) {
+ CellLayout cellLayout = (CellLayout) mWorkspace.getPageAt(i);
+ writer.println(prefix + "\tcellLayout." + i + ".mHasOnLayoutBeenCalled="
+ + cellLayout.mHasOnLayoutBeenCalled);
+ writer.println(prefix + "\tshortcutAndWidgetContainer." + i + ".mHasOnLayoutBeenCalled="
+ + cellLayout.getShortcutsAndWidgets().mHasOnLayoutBeenCalled);
+ }
+
// Extra logging for general debugging
mDragLayer.dump(prefix, writer);
mStateManager.dump(prefix, writer);