Merge "Allow IME to register callbacks with negative priorities." into tm-qpr-dev
This commit is contained in:
@@ -123,7 +123,7 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc
|
|||||||
|
|
||||||
private void receive(
|
private void receive(
|
||||||
int resultCode, Bundle resultData,
|
int resultCode, Bundle resultData,
|
||||||
@NonNull OnBackInvokedDispatcher receivingDispatcher) {
|
@NonNull WindowOnBackInvokedDispatcher receivingDispatcher) {
|
||||||
final int callbackId = resultData.getInt(RESULT_KEY_ID);
|
final int callbackId = resultData.getInt(RESULT_KEY_ID);
|
||||||
if (resultCode == RESULT_CODE_REGISTER) {
|
if (resultCode == RESULT_CODE_REGISTER) {
|
||||||
int priority = resultData.getInt(RESULT_KEY_PRIORITY);
|
int priority = resultData.getInt(RESULT_KEY_PRIORITY);
|
||||||
@@ -140,11 +140,11 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc
|
|||||||
@NonNull IOnBackInvokedCallback iCallback,
|
@NonNull IOnBackInvokedCallback iCallback,
|
||||||
@OnBackInvokedDispatcher.Priority int priority,
|
@OnBackInvokedDispatcher.Priority int priority,
|
||||||
int callbackId,
|
int callbackId,
|
||||||
@NonNull OnBackInvokedDispatcher receivingDispatcher) {
|
@NonNull WindowOnBackInvokedDispatcher receivingDispatcher) {
|
||||||
final ImeOnBackInvokedCallback imeCallback =
|
final ImeOnBackInvokedCallback imeCallback =
|
||||||
new ImeOnBackInvokedCallback(iCallback, callbackId, priority);
|
new ImeOnBackInvokedCallback(iCallback, callbackId, priority);
|
||||||
mImeCallbacks.add(imeCallback);
|
mImeCallbacks.add(imeCallback);
|
||||||
receivingDispatcher.registerOnBackInvokedCallback(priority, imeCallback);
|
receivingDispatcher.registerOnBackInvokedCallbackUnchecked(imeCallback, priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void unregisterReceivedCallback(
|
private void unregisterReceivedCallback(
|
||||||
|
|||||||
Reference in New Issue
Block a user