Clarify on return value of IC#setImeConsumesInput()

This CL aims to clarify on what the return value of

  InputConnection#setImeConsumesInput()

means for both the IME authors and editor authors [1][2].

In short, the semantics is exactly the same as

  InputConnection#performSpellCheck()

hence this CL reuses its @return section.

Other than clarifying an API doc, this CL changes nothing.

 [1]: Ic04cacfd73f1f4cb254bb16caf6b04c00c91a318
      30fe6aa964
 [2]: I8ac1ea4d53f747b0086ed415ff90793dfc6155bc
      66b21086e3

Bug: 175362887
Fix: 194099171
Test: presubmit
Change-Id: Ibdfe81a9dd1448856797aaed2f14de1314da1cac
This commit is contained in:
Yohei Yukawa
2021-07-23 09:31:44 -07:00
parent b72545e7b1
commit f9ca70be57

View File

@@ -1013,8 +1013,10 @@ public interface InputConnection {
*
* @param imeConsumesInput {@code true} when the IME is consuming input and the cursor should be
* hidden, {@code false} when input to the editor resumes and the cursor should be shown again.
* @return {@code true} on success, {@code false} if the input connection is no longer valid, or
* the protocol is not supported.
* @return For editor authors, the return value will always be ignored. For IME authors, this
* method returns {@code true} if the request was sent (whether or not the associated
* editor does something based on this request), {@code false} if the input connection
* is no longer valid.
*/
default boolean setImeConsumesInput(boolean imeConsumesInput) {
return false;