summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author kholoud mohamed <kholoudm@google.com> 2021-03-05 10:31:42 +0000
committer kholoud mohamed <kholoudm@google.com> 2021-03-05 10:37:17 +0000
commitec8b1449f257337dab95c8e4c4957c749b1291d8 (patch)
treefd7bcc4886f44dab40dd43146e6b8c36969b8df4
parented23887b8ebe0dc9a7b882763164d52c84463621 (diff)
Expose getInputMethodListAsUser as a testAPI
This is required for a newly added gts test. Bug: 180328483 Bug: 175380793 Test: atest ManagedProvisioningRequiredAppsTest Change-Id: I4b73d9374d7a2ce4c9dfc48682a43d5d48b39042
-rw-r--r--core/api/test-current.txt1
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index e4757e6204b7..501ac9655a4d 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -2695,6 +2695,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<android.view.inputmethod.InputMethodInfo> 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 a8fff8bb6a43..cd9d8bf1cff0 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -1373,7 +1373,9 @@ public final class InputMethodManager {
* @return {@link List} of {@link InputMethodInfo}.
* @hide
*/
+ @TestApi
@RequiresPermission(INTERACT_ACROSS_USERS_FULL)
+ @NonNull
public List<InputMethodInfo> getInputMethodListAsUser(@UserIdInt int userId) {
try {
final Completable.InputMethodInfoList value = Completable.createInputMethodInfoList();