Let IC#reportFullscreenMode() honor IC#getHandler()
This CL fixes a regression that
InputConnection#reportFullscreenMode()
is always called back on the main thread rather than its associated
thread. In most of cases those two threads are the same hence there
is no semantic problem, threads are the same, but for some special
cases, e.g. when apps explicitly override
InputConnection#getHandler(),
our thread affinity contract can be violated.
This regression was accidentally introduced in Android O time frame
while attempting to make the system more robust at Bug 28406127 [1].
Although we have never received any actual issue report from app
developers so far, this is still worth fixing.
[1]: If23e7c7c265ab3dfb48c2fb6fdb361b17d22c594
2bc66171cce4d5ae7bee2c3920e82e45a9d245af
Bug: 28406127
Fix: 193588937
Test: atest CtsInputMethodTestCases:InputConnectionHandlerTest
Change-Id: Id3ac21c11d6b062bb66719109376ff642309b8ff
3 files changed