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/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 7e9e864..ee72c22 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -86,7 +86,7 @@
public class CellLayout extends ViewGroup {
private static final String TAG = "CellLayout";
- private static final boolean LOGD = false;
+ private static final boolean LOGD = true;
/** The color of the "leave-behind" shape when a folder is opened from Hotseat. */
private static final int FOLDER_LEAVE_BEHIND_COLOR = Color.argb(160, 245, 245, 245);
@@ -166,6 +166,7 @@
private final int[] mDragCellSpan = new int[2];
private boolean mDragging = false;
+ public boolean mHasOnLayoutBeenCalled = false;
private final TimeInterpolator mEaseOutInterpolator;
protected final ShortcutAndWidgetContainer mShortcutsAndWidgets;
@@ -1009,6 +1010,7 @@
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ mHasOnLayoutBeenCalled = true; // b/349929393 - is the required call to onLayout not done?
int left = getPaddingLeft();
left += (int) Math.ceil(getUnusedHorizontalSpace() / 2f);
int right = r - l - getPaddingRight();