text-input: needs more preedit control
While working on a suggestion engine for Squeekboard, I noticed that the text-input interface has insufficient control of the preedit.
The issue is that if the preedit for whatever reason does not match what the input method just sent, the input method is going to have an invalid belief about the preedit, can desynchronize, and offer invalid aid like wrong suggestions.
I can foresee at least one case where an input method will have a wrong belief: if the application keeps the preedit after switching away and back into the text field. Other cases I'm less sure about is interactions using the keyboard, and hitting length limit.
The solution has been suggested before IIRC: give the client the ability to report back the contents of the preedit, much like it already happens with surrounding text.