Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69ed2005 authored by Adam Cohen's avatar Adam Cohen
Browse files

Fix regression which was causing requestLayout in layout pass

-> This caused funky layout issues with views not appearing
   on devices prior to K in addition to log spam.

issue 17282728

Change-Id: Id05856ba2ef3de3a8a636ba9b4b46ddef3eff75e
parent 74dc410b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -362,9 +362,15 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen

        if (!isDataReady()) {
            if ((LauncherAppState.isDisableAllApps() || !mApps.isEmpty()) && !mWidgets.isEmpty()) {
                post(new Runnable() {
                    // This code triggers requestLayout so must be posted outside of the
                    // layout pass.
                    public void run() {
                        setDataIsReady();
                        onDataReady(getMeasuredWidth(), getMeasuredHeight());
                    }
                });
            }
        }
    }

+0 −2
Original line number Diff line number Diff line
@@ -996,9 +996,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
        }

        if (mFirstLayout && mCurrentPage >= 0 && mCurrentPage < getChildCount()) {
            setHorizontalScrollBarEnabled(false);
            updateCurrentPageScroll();
            setHorizontalScrollBarEnabled(true);
            mFirstLayout = false;
        }

+1 −1

File changed.

Contains only whitespace changes.