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
Loading
Please register or sign in to comment