Expose getInputMethodListAsUser as a testAPI

This is required for a newly added gts test.

Bug: 180328483
Bug: 175380793
Test: atest ManagedProvisioningRequiredAppsTest
Change-Id: I4b73d9374d7a2ce4c9dfc48682a43d5d48b39042
This commit is contained in:
kholoud mohamed
2021-03-05 10:31:42 +00:00
parent ed23887b8e
commit ec8b1449f2
2 changed files with 3 additions and 0 deletions

View File

@@ -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();
}

View File

@@ -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();