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

Commit 91edaf64 authored by Johannes Gallmann's avatar Johannes Gallmann Committed by Android (Google) Code Review
Browse files

Merge "Prevent dispatching onBackStarted too early for gesture nav" into main

parents b4d1ca9e c7a24c3d
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1106,13 +1106,15 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
            mCurrentTracker.updateStartLocation();
            BackMotionEvent startEvent = mCurrentTracker.createStartEvent(mApps[0]);
            dispatchOnBackStarted(mActiveCallback, startEvent);
            if (startEvent.getSwipeEdge() == EDGE_NONE) {
                // TODO(b/373544911): onBackStarted is dispatched here so that
            //  WindowOnBackInvokedDispatcher knows about the back navigation and intercepts touch
            //  events while it's active. It would be cleaner and safer to disable multitouch
            //  altogether (same as in gesture-nav).
                //  WindowOnBackInvokedDispatcher knows about the back navigation and intercepts
                //  touch events while it's active. It would be cleaner and safer to disable
                //  multitouch altogether (same as in gesture-nav).
                dispatchOnBackStarted(mBackNavigationInfo.getOnBackInvokedCallback(), startEvent);
            }
        }
    }

    private void requestTopUi(boolean hasTopUi, int backType) {
        if (mRequestTopUiCallback != null && (backType == BackNavigationInfo.TYPE_CROSS_TASK