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

Commit 394313cc authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "[PB] Pilfer pointers if no focus window." into main

parents fd1c0db8 bf4bd063
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -422,6 +422,12 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
    @VisibleForTesting
    public void onThresholdCrossed() {
        mThresholdCrossed = true;
        // There was no focus window when calling startBackNavigation, still pilfer pointers so
        // the next focus window won't receive motion events.
        if (mBackNavigationInfo == null) {
            tryPilferPointers();
            return;
        }
        // Dispatch onBackStarted, only to app callbacks.
        // System callbacks will receive onBackStarted when the remote animation starts.
        final boolean shouldDispatchToAnimator = shouldDispatchToAnimator();
@@ -542,6 +548,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
        if (backNavigationInfo == null) {
            ProtoLog.e(WM_SHELL_BACK_PREVIEW, "Received BackNavigationInfo is null.");
            cancelLatencyTracking();
            tryPilferPointers();
            return;
        }
        final int backType = backNavigationInfo.getType();