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

Commit 3b3b7305 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17211289

Change-Id: I44c128448ef604080a161b550781e75f5ad1666c
parents 55910499 7d6a8ea0
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;
        }
    }