Merge "Simplify IMMS#getEnabledInputMethodSubtypeList() a bit"

This commit is contained in:
TreeHugger Robot
2022-07-26 03:54:34 +00:00
committed by Android (Google) Code Review

View File

@@ -2208,15 +2208,10 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
boolean allowsImplicitlySelectedSubtypes) {
final int callingUserId = UserHandle.getCallingUserId();
synchronized (ImfLock.class) {
final int[] resolvedUserIds = InputMethodUtils.resolveUserId(callingUserId,
mSettings.getCurrentUserId(), null);
if (resolvedUserIds.length != 1) {
return Collections.emptyList();
}
final long ident = Binder.clearCallingIdentity();
try {
return getEnabledInputMethodSubtypeListLocked(imiId,
allowsImplicitlySelectedSubtypes, resolvedUserIds[0]);
allowsImplicitlySelectedSubtypes, callingUserId);
} finally {
Binder.restoreCallingIdentity(ident);
}