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

Commit 515e3ce2 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Clarify required permission in IMM#getInputMethodListAsUser()"

parents f65ce230 05e924b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3159,7 +3159,7 @@ package android.view.inputmethod {
  public final class InputMethodManager {
    method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void addVirtualStylusIdForTestSession();
    method public int getDisplayId();
    method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public java.util.List<android.view.inputmethod.InputMethodInfo> getInputMethodListAsUser(int);
    method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodInfo> getInputMethodListAsUser(int);
    method public boolean hasActiveInputConnection(@Nullable android.view.View);
    method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean isInputMethodPickerShown();
    method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void setStylusWindowIdleTimeoutForTest(long);
+1 −0
Original line number Diff line number Diff line
@@ -212,6 +212,7 @@ final class IInputMethodManagerGlobalInvoker {

    @AnyThread
    @NonNull
    @RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)
    static List<InputMethodInfo> getInputMethodList(@UserIdInt int userId,
            @DirectBootAwareness int directBootAwareness) {
        final IInputMethodManager service = getService();
+4 −1
Original line number Diff line number Diff line
@@ -1549,13 +1549,16 @@ public final class InputMethodManager {
    /**
     * Returns the list of installed input methods for the specified user.
     *
     * <p>{@link Manifest.permission#INTERACT_ACROSS_USERS_FULL} is required when and only when
     * {@code userId} is different from the user id of the current process.</p>
     *
     * @param userId user ID to query
     * @return {@link List} of {@link InputMethodInfo}.
     * @hide
     */
    @TestApi
    @RequiresPermission(INTERACT_ACROSS_USERS_FULL)
    @NonNull
    @RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)
    public List<InputMethodInfo> getInputMethodListAsUser(@UserIdInt int userId) {
        return IInputMethodManagerGlobalInvoker.getInputMethodList(userId,
                DirectBootAwareness.AUTO);