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

Commit 9f8ba059 authored by Shan Huang's avatar Shan Huang Committed by Automerger Merge Worker
Browse files

Merge "Allow IME to register callbacks with negative priorities." into...

Merge "Allow IME to register callbacks with negative priorities." into tm-qpr-dev am: 77bef7e1 am: 6eda890a

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



Change-Id: Ic63fcdd5f3f84fb2d21b47abd72b02c3a66bef39
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2c85e87d 6eda890a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc

    private void receive(
            int resultCode, Bundle resultData,
            @NonNull OnBackInvokedDispatcher receivingDispatcher) {
            @NonNull WindowOnBackInvokedDispatcher receivingDispatcher) {
        final int callbackId = resultData.getInt(RESULT_KEY_ID);
        if (resultCode == RESULT_CODE_REGISTER) {
            int priority = resultData.getInt(RESULT_KEY_PRIORITY);
@@ -140,11 +140,11 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc
            @NonNull IOnBackInvokedCallback iCallback,
            @OnBackInvokedDispatcher.Priority int priority,
            int callbackId,
            @NonNull OnBackInvokedDispatcher receivingDispatcher) {
            @NonNull WindowOnBackInvokedDispatcher receivingDispatcher) {
        final ImeOnBackInvokedCallback imeCallback =
                new ImeOnBackInvokedCallback(iCallback, callbackId, priority);
        mImeCallbacks.add(imeCallback);
        receivingDispatcher.registerOnBackInvokedCallback(priority, imeCallback);
        receivingDispatcher.registerOnBackInvokedCallbackUnchecked(imeCallback, priority);
    }

    private void unregisterReceivedCallback(