RemoteInputConnectionImpl should not call on IMM#isActive()
Historically RemoteInputConnectionImpl has been calling on
InputMethodManager#isActive()
to see if the InputConnection is considered to be active or inactive
when actually handling each incoming InputConnection operation.
However, InputMethodManager#isActive() is also known to be tricky
because it internally calls InputMethodManager#checkFocus(), which can
have non-trivial side effects.
With this CL, RemoteInputConnectionImpl keeps maintains its own
boolean state on whether #deactivate() is already called or not so
that it does not need to rely on IMM#isActive() any more.
For 99% cases there must be no observable behavior change, and for the
remaining 1% cases the new behavior should be more easily
understandable.
Bug: 291826769
Test: atest CtsInputMethodTestCases:InputConnectionHandlerTest#testInputConnectionSideEffect
Merged-In: I2fb9c549da19ff01e7cc3fd8bfc1f9c19aa0f0a8
Change-Id: I2fb9c549da19ff01e7cc3fd8bfc1f9c19aa0f0a8
1 file changed