summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShan Huang <shanh@google.com>2023-01-06 19:54:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2023-01-06 19:54:30 +0000
commit467383f0fd0d56f90f58792e2a35e70e2adce73d (patch)
treea4456d1c5609d3fa1108918bdebf62938e0caeac
parentb8f0a2b550988a81df5e4494341aee4ac9020c91 (diff)
parent6577b62a5d89e73d9ce05423c72d2ff213ec0097 (diff)
downloadbase-467383f0fd0d56f90f58792e2a35e70e2adce73d.tar.gz
Merge "Allow IME to register system back callbacks in ImeOnBackInvokedDispatcher#switchRootView." into tm-qpr-dev
-rw-r--r--core/java/android/window/ImeOnBackInvokedDispatcher.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/java/android/window/ImeOnBackInvokedDispatcher.java b/core/java/android/window/ImeOnBackInvokedDispatcher.java
index 9152e7837b82..a0bd7f70ca58 100644
--- a/core/java/android/window/ImeOnBackInvokedDispatcher.java
+++ b/core/java/android/window/ImeOnBackInvokedDispatcher.java
@@ -220,16 +220,14 @@ public class ImeOnBackInvokedDispatcher implements OnBackInvokedDispatcher, Parc
* @param previous the previously focused {@link ViewRootImpl}.
* @param current the currently focused {@link ViewRootImpl}.
*/
- // TODO(b/232845902): Add CTS to test IME back behavior when there's root view change while
- // IME is up.
public void switchRootView(ViewRootImpl previous, ViewRootImpl current) {
for (ImeOnBackInvokedCallback imeCallback : mImeCallbacks) {
if (previous != null) {
previous.getOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(imeCallback);
}
if (current != null) {
- current.getOnBackInvokedDispatcher().registerOnBackInvokedCallback(
- imeCallback.mPriority, imeCallback);
+ current.getOnBackInvokedDispatcher().registerOnBackInvokedCallbackUnchecked(
+ imeCallback, imeCallback.mPriority);
}
}
}