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

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

Merge "Fix pointers pilfered when they shouldn't be" into main

parents 86f0bde3 8bea4595
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont

    @Nullable
    private BackNavigationInfo mBackNavigationInfo;
    private boolean mReceivedNullNavigationInfo = false;
    private final IActivityTaskManager mActivityTaskManager;
    private final Context mContext;
    private final ContentResolver mContentResolver;
@@ -430,7 +431,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
        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) {
        if (mBackNavigationInfo == null && mReceivedNullNavigationInfo) {
            tryPilferPointers();
            return;
        }
@@ -553,6 +554,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
        ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Received backNavigationInfo:%s", backNavigationInfo);
        if (backNavigationInfo == null) {
            ProtoLog.e(WM_SHELL_BACK_PREVIEW, "Received BackNavigationInfo is null.");
            mReceivedNullNavigationInfo = true;
            cancelLatencyTracking();
            tryPilferPointers();
            return;
@@ -909,6 +911,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
        mPointersPilfered = false;
        mShellBackAnimationRegistry.resetDefaultCrossActivity();
        cancelLatencyTracking();
        mReceivedNullNavigationInfo = false;
        if (mBackNavigationInfo != null) {
            mPreviousNavigationType = mBackNavigationInfo.getType();
            mBackNavigationInfo.onBackNavigationFinished(triggerBack);