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

Commit 4b2bf90f authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Proper fix for gesture nav flicker using runOnPageScrollsInitialized()" into tm-qpr-dev

parents ca648034 bed0d636
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
            });

        setupRecentsViewUi();
        linkRecentsViewScroll();
        mRecentsView.runOnPageScrollsInitialized(this::linkRecentsViewScroll);
        activity.runOnBindToTouchInteractionService(this::onLauncherBindToService);

        mActivity.registerActivityLifecycleCallbacks(mLifecycleCallbacks);
+1 −1
Original line number Diff line number Diff line
@@ -2303,7 +2303,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        boolean runningTaskTileHidden = mRunningTaskTileHidden;
        setCurrentTask(runningTaskViewId);
        mFocusedTaskViewId = runningTaskViewId;
        setCurrentPage(getRunningTaskIndex());
        runOnPageScrollsInitialized(() -> setCurrentPage(getRunningTaskIndex()));
        setRunningTaskViewShowScreenshot(false);
        setRunningTaskHidden(runningTaskTileHidden);
        // Update task size after setting current task.
+1 −3
Original line number Diff line number Diff line
@@ -1187,9 +1187,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
    }

    public int getScrollForPage(int index) {
        // TODO(b/233112195): Use !pageScrollsInitialized() instead of mPageScrolls == null, once we
        // root cause where we should be using runOnPageScrollsInitialized().
        if (mPageScrolls == null || index >= mPageScrolls.length || index < 0) {
        if (!pageScrollsInitialized() || index >= mPageScrolls.length || index < 0) {
            return 0;
        } else {
            return mPageScrolls[index];