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

Commit 60cd9f22 authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Protect bubble gesture monitor against re-entrant calls" into main

parents 06eee986 bb4ddd55
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2535,8 +2535,9 @@ public class BubbleStackView extends FrameLayout

    private void stopMonitoringSwipeUpGestureInternal() {
        if (mBubblesNavBarGestureTracker != null) {
            mBubblesNavBarGestureTracker.stop();
            final BubblesNavBarGestureTracker tracker = mBubblesNavBarGestureTracker;
            mBubblesNavBarGestureTracker = null;
            tracker.stop();
            setOnTouchListener(null);
        }
    }
+6 −2
Original line number Diff line number Diff line
@@ -82,12 +82,16 @@ class BubblesNavBarGestureTracker {

    private void stopInternal() {
        if (mInputEventReceiver != null) {
            mInputEventReceiver.dispose();
            // Clear the field before calling dispose() to guard against re-entrant calls from it
            InputEventReceiver receiver = mInputEventReceiver;
            mInputEventReceiver = null;
            receiver.dispose();
        }
        if (mInputMonitor != null) {
            mInputMonitor.dispose();
            // Clear the field before calling dispose() to guard against re-entrant calls from it
            InputMonitor monitor = mInputMonitor;
            mInputMonitor = null;
            monitor.dispose();
        }
    }