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
This commit is contained in:
Stefan Andonian
2024-08-14 22:51:32 +00:00
parent ecb9ecd770
commit fb34891ba6
4 changed files with 21 additions and 1 deletions

View File

@@ -64,6 +64,7 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon.
private final ActivityContext mActivity;
private boolean mInvertIfRtl = false;
public boolean mHasOnLayoutBeenCalled = false;
@Nullable
private TranslationProvider mTranslationProvider = null;
@@ -201,6 +202,7 @@ public class ShortcutAndWidgetContainer extends ViewGroup implements FolderIcon.
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
Trace.beginSection("ShortcutAndWidgetConteiner#onLayout");
mHasOnLayoutBeenCalled = true; // b/349929393 - is the required call to onLayout not done?
int count = getChildCount();
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);