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

Commit 0f3f78fc authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Add extra checks in isReadyToShowIme

This adds some additional checks to isReadyToShowIme() in
ImeInsetsSourceProvider, so we don't actually start the mShowImeRunner
too early. Otherwise, we would drop this show request from being
scheduled here, and when we eventually get the required missing state,
won't try to show, which in some edge cases leads to the IME eventually
not showing.

We need to ensure there is no mismatch between the InsetsControlTarget
we get, and the one in DisplayContent. We also need to check that the
client already got the InsetsSourceControl, and that the control has a
leash. This also implies checking the controlTarget is not in the
list of those pending to be sent to the client. We should also check
that the control has a leash, and the leash is ready for dispatching.
We need to make sure that the non-empty source frame was set, which
requires server visibile being true. Lastly, we must check if
the ImeInsetsSourceProvider is set frozen, which blocks setting the
server visibility.

Bug: 327712574
Test: atest
  ImeInsetsSourceProviderTest
  InsetsSourceProviderTest#testGetLeash
  InsetsStateControllerTest#testHasPendingControls
Change-Id: Ia370c554b49790bbfe58f58f96c4e3a0bca9b1aa
parent c3f30078
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