diff options
| -rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java | 20 | ||||
| -rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 11 |
2 files changed, 31 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java index c82e5be7c643..cc9f63048843 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java @@ -27,6 +27,7 @@ import android.inputmethodservice.InputMethodService; import android.os.IBinder; import android.view.inputmethod.InlineSuggestionsRequest; import android.view.inputmethod.InputMethodInfo; +import android.view.inputmethod.InputMethodSubtype; import com.android.internal.inputmethod.IAccessibilityInputMethodSession; import com.android.internal.inputmethod.InlineSuggestionsRequestCallback; @@ -100,6 +101,18 @@ public abstract class InputMethodManagerInternal { public abstract List<InputMethodInfo> getEnabledInputMethodListAsUser(@UserIdInt int userId); /** + * Returns the list of installed input methods that are enabled for the specified user. + * + * @param imiId IME ID to be queried about + * @param allowsImplicitlyEnabledSubtypes {@code true} to return the implicitly enabled subtypes + * @param userId the user ID to be queried about + * @return a list of {@link InputMethodSubtype} that are enabled for {@code userId} + */ + @NonNull + public abstract List<InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser( + String imiId, boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId); + + /** * Called by the Autofill Frameworks to request an {@link InlineSuggestionsRequest} from * the input method. * @@ -312,6 +325,13 @@ public abstract class InputMethodManagerInternal { return Collections.emptyList(); } + @NonNull + @Override + public List<InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser(String imiId, + boolean allowsImplicitlyEnabledSubtypes, int userId) { + return Collections.emptyList(); + } + @Override public void onCreateInlineSuggestionsRequest(@UserIdInt int userId, InlineSuggestionsRequestInfo requestInfo, diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index cbe202b5adc8..e8c15987751a 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -5865,6 +5865,17 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } } + @NonNull + @Override + public List<InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser( + String imiId, boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId) { + synchronized (ImfLock.class) { + return getEnabledInputMethodSubtypeListLocked(imiId, + allowsImplicitlyEnabledSubtypes, + userId, Process.SYSTEM_UID); + } + } + @Override public void onCreateInlineSuggestionsRequest(@UserIdInt int userId, InlineSuggestionsRequestInfo requestInfo, InlineSuggestionsRequestCallback cb) { |