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

Commit c7a24c3d authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

Prevent dispatching onBackStarted too early for gesture nav

Bug: 383527784
Flag: EXEMPT bugfix
Test: Manual, i.e. testing touches and long clicks in apps at screen edge on screens with predictive back system animations
Change-Id: Ie596e2a39bfae6db2a574552999f5f128d4aa665
parent d66cb8ec
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