diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 9fde79171cf66..e8d0a5432e1ac 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -2736,6 +2736,7 @@ package android.view.inputmethod { public final class InputMethodManager { method public int getDisplayId(); + method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public java.util.List getInputMethodListAsUser(int); method public boolean hasActiveInputConnection(@Nullable android.view.View); method public boolean isInputMethodPickerShown(); } diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index c6e5eee3568e0..ff4d671bf9029 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -1308,7 +1308,9 @@ public final class InputMethodManager { * @return {@link List} of {@link InputMethodInfo}. * @hide */ + @TestApi @RequiresPermission(INTERACT_ACROSS_USERS_FULL) + @NonNull public List getInputMethodListAsUser(@UserIdInt int userId) { try { final Completable.InputMethodInfoList value = Completable.createInputMethodInfoList();