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

Skip to content
Commit dfc5564a authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Use current IME target to update IME request state if no insets target

This is the preparation to remove outdated
mImeInsetsFrozenUntilStartInput, which is no longer valid since
shell transition enabled because it was used for animating but
now it is only set after animation is finished.

The corresponding logic onImeInsetsClientVisibilityUpdate may trigger
redundant invokeOnImeRequestedChangedListener which may hide some
real problems. Such as the IME hide request from remote insets
target doesn't work.

So this change gives a chance to fallback using current IME target
to update IME state, which aligns the same logic as
ImeInsetsSourceProvider#updateClientVisibility that always use
current IME target, them IME can get correct state earlier rather
than relying on random event which calls updateClientVisibility.

Bug: 298172246
Flag: android.view.inputmethod.refactor_insets_controller
Test: Assume that onImeInsetsClientVisibilityUpdate is removed:
      Use 3 button navigation.
      Launch a split-pair task. Return to home.
      Launch another task with showing IME.
      Use recents key to switch to split-pair which didn't show IME.
      The navigation bar should not be IME visible state
      (the back arrow should not show as downward).

Change-Id: I78208c08ed1b64d9edb2fa65ca78b6dd906342d1
parent 310f7b88
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