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

Commit 7d6a8ea0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Clear application / system callback when the other one is set" into tm-dev

parents 9451a7a6 349f014c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -860,6 +860,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    /**
     * @see #setOnBackInvokedCallback(IOnBackInvokedCallback)
     */
    // TODO(b/224856664): Consolidate application and system callback into one.
    private IOnBackInvokedCallback mApplicationOnBackInvokedCallback;
    private IOnBackInvokedCallback mSystemOnBackInvokedCallback;

@@ -1125,7 +1126,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                this, onBackInvokedCallback);
        if (priority >= 0) {
            mApplicationOnBackInvokedCallback = onBackInvokedCallback;
            mSystemOnBackInvokedCallback = null;
        } else {
            mApplicationOnBackInvokedCallback = null;
            mSystemOnBackInvokedCallback = onBackInvokedCallback;
        }
    }