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

Commit 38126202 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix RecentsView scroll linking" into ub-launcher3-rvc-dev am: 72ac7818

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11936452

Change-Id: I5f9e7ef48d82c8ecd4f496e8b7c960b7dd232f56
parents 108c7b65 72ac7818
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -121,10 +121,6 @@ public abstract class BaseSwipeUpHandler<T extends StatefulActivity<?>, Q extend
        });
        });


        mRecentsView.setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
        mRecentsView.setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
            // Wait until the first scroll event before applying scroll to taskViewSimulator.
            // Since, by default the current/running task already centered, this ensures that we
            // do not move the running task, in case RecentsView has not yet laid out completely.
            mRecentsViewScrollLinked = true;
            if (moveWindowWithRecentsScroll()) {
            if (moveWindowWithRecentsScroll()) {
                updateFinalShift();
                updateFinalShift();
            }
            }
@@ -132,6 +128,7 @@ public abstract class BaseSwipeUpHandler<T extends StatefulActivity<?>, Q extend
        runOnRecentsAnimationStart(() ->
        runOnRecentsAnimationStart(() ->
                mRecentsView.setRecentsAnimationTargets(mRecentsAnimationController,
                mRecentsView.setRecentsAnimationTargets(mRecentsAnimationController,
                        mRecentsAnimationTargets));
                        mRecentsAnimationTargets));
        mRecentsViewScrollLinked = true;
    }
    }


    protected void startNewTask(Consumer<Boolean> resultCallback) {
    protected void startNewTask(Consumer<Boolean> resultCallback) {
+2 −0
Original line number Original line Diff line number Diff line
@@ -1664,6 +1664,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
                    !mOrientationState.canLauncherRotate() && isInLandscape);
                    !mOrientationState.canLauncherRotate() && isInLandscape);
            resetPaddingFromTaskSize();
            resetPaddingFromTaskSize();
            requestLayout();
            requestLayout();
            // Reapply the current page to update page scrolls.
            setCurrentPage(mCurrentPage);
        }
        }
    }
    }