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

Commit 9d8eeabf authored by Alex Chau's avatar Alex Chau
Browse files

Reset touch state when removing all tasks in RecentsView.applyLoadPlan

Fix: 223245248
Test: com.android.quickstep.FallbackRecentsTest#goToOverviewFromHome
Change-Id: I1cc8952e077b9cc79a93d909b80e215e61e8deab
parent d5d06190
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1390,6 +1390,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        if (taskGroups == null || taskGroups.isEmpty()) {
            removeTasksViewsAndClearAllButton();
            onTaskStackUpdated();
            // With all tasks removed, touch handling in PagedView is disabled and we need to reset
            // touch state or otherwise values will be obsolete.
            resetTouchState();
            return;
        }

+1 −1
Original line number Diff line number Diff line
@@ -1441,7 +1441,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
        return Math.abs(velocity) > threshold;
    }

    private void resetTouchState() {
    protected void resetTouchState() {
        releaseVelocityTracker();
        mIsBeingDragged = false;
        mActivePointerId = INVALID_POINTER;