Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8c0b18e authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

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
      30fe6aa9
 [2]: I8ac1ea4d53f747b0086ed415ff90793dfc6155bc
      66b21086

Bug: 175362887
Fix: 194099171
Test: presubmit
Change-Id: Ibdfe81a9dd1448856797aaed2f14de1314da1cac
Merged-In: Ibdfe81a9dd1448856797aaed2f14de1314da1cac
(cherry picked from commit f9ca70be)
parent b8364adc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;