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

Commit 407aa0ce authored by Felix Stern's avatar Felix Stern
Browse files

Not dispatching another show request to IMS if already shown

With the changes in [1], client visibility is updated at the beginning of a hide animation, but in ImeInsetsSourceProvider#invokeOnImeRequestedChangedListener, we still invoke the listener with visible=true (as the IME is currently animating). This will call IMS with a show request, although the request is eventually cancelled.
However, to not invoke a redundant show request, we can check if another show request was previously triggered, and early return in that case.

[1]: Ibd4b0c43450681b526ca4ed8a79fcb7fa5f2ad2c

Fix: 326377046
Flag: android.view.inputmethod.report_animating_insets_types
Test: atest KeyboardVisibilityControlTest#testImeNoShowSoftInputCallDuringHideAnimation
Test: atest KeyboardVisibilityControlTest#testImeState_AlwaysHidden_EditorDialogLostFocusAfterUnlocked
Test: atest FocusHandlingTest#testMultiWindowFocusHandleOnDifferentUiThread
Test: atest ImeSwitchingTest#testImeUnboundAfterSwitchingWithoutInputFocus
Change-Id: Ib04023b5391b07fb829329ae1683efd63f98d358
parent f6a4d285
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