Rely on IMM#focusOut() to close input session.
Historically we have been doing nothing in IMM#focusOut(). Problem of ignoring IMM#focusOut() may not be obvious as long as IMM#focusIn() is called immediately after IMM#focusOut(). In some particular situations, however, IMM can fall into an inconsistent state where the software keyboard continues to be shown even when there is no text input field. As reported in b.android.com/171190 or Bug 20820914, we can easily reproduce that inconsistent state by removing a focused EditText from the parent view while the IME still keeps an active connection to the EditText. This CL tries to address such a situation by staring using IMM#focusOut() as another trigger to check IME focus. Note that this CL has no effect if IMM#focusOut was called after the current window losed the focus. It is supposed to be taken care of in subsequent CLs for Bug 20612313. This CL depends on Id6afc8fc64512225578c62557b96c7dc2e969adf. Bug: 20612313 Change-Id: Ib1b037594ebbb4ad4cf2d59e21c7a8ca9d8dc930
Loading
Please register or sign in to comment