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

Commit 72446ef2 authored by Yabin Huang's avatar Yabin Huang
Browse files

Update Java doc of InputMethodManagerInternal

Bug: 305829876
Test: m
Change-Id: Id6d1ce7d398ef074666d7e63b27e627c42c90eb9
parent 0bab1185
Loading
Loading
Loading
Loading
+28 −22
Original line number Original line Diff line number Diff line
@@ -50,6 +50,8 @@ public abstract class InputMethodManagerInternal {
    /**
    /**
     * Called by the power manager to tell the input method manager whether it
     * Called by the power manager to tell the input method manager whether it
     * should start watching for wake events.
     * should start watching for wake events.
     *
     * @param interactive the interactive mode parameter
     */
     */
    public abstract void setInteractive(boolean interactive);
    public abstract void setInteractive(boolean interactive);


@@ -61,16 +63,16 @@ public abstract class InputMethodManagerInternal {
    /**
    /**
     * Returns the list of installed input methods for the specified user.
     * Returns the list of installed input methods for the specified user.
     *
     *
     * @param userId The user ID to be queried.
     * @param userId the user ID to be queried
     * @return A list of {@link InputMethodInfo}.  VR-only IMEs are already excluded.
     * @return a list of {@link InputMethodInfo}. VR-only IMEs are already excluded
     */
     */
    public abstract List<InputMethodInfo> getInputMethodListAsUser(@UserIdInt int userId);
    public abstract List<InputMethodInfo> getInputMethodListAsUser(@UserIdInt int userId);


    /**
    /**
     * Returns the list of installed input methods that are enabled for the specified user.
     * Returns the list of installed input methods that are enabled for the specified user.
     *
     *
     * @param userId The user ID to be queried.
     * @param userId the user ID to be queried
     * @return A list of {@link InputMethodInfo} that are enabled for {@code userId}.
     * @return a list of {@link InputMethodInfo} that are enabled for {@code userId}
     */
     */
    public abstract List<InputMethodInfo> getEnabledInputMethodListAsUser(@UserIdInt int userId);
    public abstract List<InputMethodInfo> getEnabledInputMethodListAsUser(@UserIdInt int userId);


@@ -78,8 +80,10 @@ public abstract class InputMethodManagerInternal {
     * Called by the Autofill Frameworks to request an {@link InlineSuggestionsRequest} from
     * Called by the Autofill Frameworks to request an {@link InlineSuggestionsRequest} from
     * the input method.
     * the input method.
     *
     *
     * @param userId      the user ID to be queried
     * @param requestInfo information needed to create an {@link InlineSuggestionsRequest}.
     * @param requestInfo information needed to create an {@link InlineSuggestionsRequest}.
     * @param cb {@link IInlineSuggestionsRequestCallback} used to pass back the request object.
     * @param cb          {@link IInlineSuggestionsRequestCallback} used to pass back the request
     *                    object
     */
     */
    public abstract void onCreateInlineSuggestionsRequest(@UserIdInt int userId,
    public abstract void onCreateInlineSuggestionsRequest(@UserIdInt int userId,
            InlineSuggestionsRequestInfo requestInfo, IInlineSuggestionsRequestCallback cb);
            InlineSuggestionsRequestInfo requestInfo, IInlineSuggestionsRequestCallback cb);
@@ -88,8 +92,8 @@ public abstract class InputMethodManagerInternal {
     * Force switch to the enabled input method by {@code imeId} for current user. If the input
     * Force switch to the enabled input method by {@code imeId} for current user. If the input
     * method with {@code imeId} is not enabled or not installed, do nothing.
     * method with {@code imeId} is not enabled or not installed, do nothing.
     *
     *
     * @param imeId  The input method ID to be switched to.
     * @param imeId  the input method ID to be switched to
     * @param userId The user ID to be queried.
     * @param userId the user ID to be queried
     * @return {@code true} if the current input method was successfully switched to the input
     * @return {@code true} if the current input method was successfully switched to the input
     * method by {@code imeId}; {@code false} the input method with {@code imeId} is not available
     * method by {@code imeId}; {@code false} the input method with {@code imeId} is not available
     * to be switched.
     * to be switched.
@@ -100,10 +104,10 @@ public abstract class InputMethodManagerInternal {
     * Force enable or disable the input method associated with {@code imeId} for given user. If
     * Force enable or disable the input method associated with {@code imeId} for given user. If
     * the input method associated with {@code imeId} is not installed, do nothing.
     * the input method associated with {@code imeId} is not installed, do nothing.
     *
     *
     * @param imeId  The input method ID to be enabled or disabled.
     * @param imeId   the input method ID to be enabled or disabled
     * @param enabled {@code true} if the input method associated with {@code imeId} should be
     * @param enabled {@code true} if the input method associated with {@code imeId} should be
     *                enabled.
     *                enabled
     * @param userId The user ID to be queried.
     * @param userId  the user ID to be queried
     * @return {@code true} if the input method associated with {@code imeId} was successfully
     * @return {@code true} if the input method associated with {@code imeId} was successfully
     * enabled or disabled, {@code false} if the input method specified is not installed
     * enabled or disabled, {@code false} if the input method specified is not installed
     * or was unable to be enabled/disabled for some other reason.
     * or was unable to be enabled/disabled for some other reason.
@@ -113,15 +117,17 @@ public abstract class InputMethodManagerInternal {


    /**
    /**
     * Registers a new {@link InputMethodListListener}.
     * Registers a new {@link InputMethodListListener}.
     *
     * @param listener the listener to add
     */
     */
    public abstract void registerInputMethodListListener(InputMethodListListener listener);
    public abstract void registerInputMethodListListener(InputMethodListListener listener);


    /**
    /**
     * Transfers input focus from a given input token to that of the IME window.
     * Transfers input focus from a given input token to that of the IME window.
     *
     *
     * @param sourceInputToken The source token.
     * @param sourceInputToken the source token.
     * @param displayId The display hosting the IME window.
     * @param displayId        the display hosting the IME window
     * @return {@code true} if the transfer is successful.
     * @return {@code true} if the transfer is successful
     */
     */
    public abstract boolean transferTouchFocusToImeWindow(@NonNull IBinder sourceInputToken,
    public abstract boolean transferTouchFocusToImeWindow(@NonNull IBinder sourceInputToken,
            int displayId);
            int displayId);
@@ -132,7 +138,7 @@ public abstract class InputMethodManagerInternal {
     * or SystemUI).
     * or SystemUI).
     *
     *
     * @param windowToken the window token that is now in control, or {@code null} if no client
     * @param windowToken the window token that is now in control, or {@code null} if no client
     *                   window is in control of the IME.
     *                    window is in control of the IME
     */
     */
    public abstract void reportImeControl(@Nullable IBinder windowToken);
    public abstract void reportImeControl(@Nullable IBinder windowToken);


@@ -163,8 +169,8 @@ public abstract class InputMethodManagerInternal {
     * Callback when the IInputMethodSession from the accessibility service with the specified
     * Callback when the IInputMethodSession from the accessibility service with the specified
     * accessibilityConnectionId is created.
     * accessibilityConnectionId is created.
     *
     *
     * @param accessibilityConnectionId The connection id of the accessibility service.
     * @param accessibilityConnectionId the connection id of the accessibility service
     * @param session The session passed back from the accessibility service.
     * @param session                   the session passed back from the accessibility service
     */
     */
    public abstract void onSessionForAccessibilityCreated(int accessibilityConnectionId,
    public abstract void onSessionForAccessibilityCreated(int accessibilityConnectionId,
            IAccessibilityInputMethodSession session);
            IAccessibilityInputMethodSession session);
@@ -173,7 +179,7 @@ public abstract class InputMethodManagerInternal {
     * Unbind the accessibility service with the specified accessibilityConnectionId from current
     * Unbind the accessibility service with the specified accessibilityConnectionId from current
     * client.
     * client.
     *
     *
     * @param accessibilityConnectionId The connection id of the accessibility service.
     * @param accessibilityConnectionId the connection id of the accessibility service
     */
     */
    public abstract void unbindAccessibilityFromCurrentClient(int accessibilityConnectionId);
    public abstract void unbindAccessibilityFromCurrentClient(int accessibilityConnectionId);


@@ -181,7 +187,7 @@ public abstract class InputMethodManagerInternal {
     * Switch the keyboard layout in response to a keyboard shortcut.
     * Switch the keyboard layout in response to a keyboard shortcut.
     *
     *
     * @param direction {@code 1} to switch to the next subtype, {@code -1} to switch to the
     * @param direction {@code 1} to switch to the next subtype, {@code -1} to switch to the
     *                           previous subtype.
     *                  previous subtype
     */
     */
    public abstract void switchKeyboardLayout(int direction);
    public abstract void switchKeyboardLayout(int direction);