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

Skip to content
Commit 8a498d23 authored by Felix Stern's avatar Felix Stern
Browse files

Deprecating ResultsReceiver usage in InputMethodManager

Previously, the ResultReceiver was passed to InputMethodManager#{show,hide}SoftInput and send along to IMS. With the changes of [1], requests from IMM are forwarded to InsetsController, where the resultReceiver was not passed, as we only send the requestedVisibleTypes to the system.
With the changes of this CL, we notify the resultReceiver in InputMethodManager, before passing the request to InsetsController.

Reason for deprecating:
The ResultReceiver is not reliable to be used for determining whether the IME is shown or not. The recommended usage would be to set a View.OnApplyWindowInsetsListener, which is invoked whenever the IME will show.

[1]: I8e3a74ee579f085cb582040fdba725e7a63d6b85

Test: blaze test \
      --android_platforms=//buildenv/platforms/android:armeabi-v7a,//buildenv/platforms/android:arm64-v8a \
      --config=android_local_adb \
      --nocache_test_results \
      --test_arg=--install_test_services \
      --test_arg=--install_basic_services \
      --runs_per_test=1 \
      //javatests/com/google/android/apps/gmail/espresso:AccountSetupTest_hub_as_gmail_dev_offline_sapi_appcompat_master
Bug: 372199387
Flag: android.view.inputmethod.refactor_insets_controller
Change-Id: I6031229f2069e565360100a9a166c34272dcaff6
parent ffda9a50
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment