Loading core/java/android/view/inputmethod/IInputMethodManagerInvoker.java +2 −2 Original line number Diff line number Diff line Loading @@ -90,10 +90,10 @@ final class IInputMethodManagerInvoker { @AnyThread @NonNull List<InputMethodSubtype> getEnabledInputMethodSubtypeList(@Nullable String imiId, boolean allowsImplicitlySelectedSubtypes, @UserIdInt int userId) { boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId) { try { return mTarget.getEnabledInputMethodSubtypeList(imiId, allowsImplicitlySelectedSubtypes, userId); allowsImplicitlyEnabledSubtypes, userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading core/java/android/view/inputmethod/InputMethodManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -1578,16 +1578,16 @@ public final class InputMethodManager { * * @param imi The {@link InputMethodInfo} whose subtypes list will be returned. If {@code null}, * returns enabled subtypes for the currently selected {@link InputMethodInfo}. * @param allowsImplicitlySelectedSubtypes A boolean flag to allow to return the implicitly * selected subtypes. If an input method info doesn't have enabled subtypes, the framework * @param allowsImplicitlyEnabledSubtypes A boolean flag to allow to return the implicitly * enabled subtypes. If an input method info doesn't have enabled subtypes, the framework * will implicitly enable subtypes according to the current system language. */ @NonNull public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(@Nullable InputMethodInfo imi, boolean allowsImplicitlySelectedSubtypes) { boolean allowsImplicitlyEnabledSubtypes) { return mServiceInvoker.getEnabledInputMethodSubtypeList( imi == null ? null : imi.getId(), allowsImplicitlySelectedSubtypes, allowsImplicitlyEnabledSubtypes, UserHandle.myUserId()); } Loading core/java/com/android/internal/view/IInputMethodManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ interface IInputMethodManager { @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)") List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in @nullable String imiId, boolean allowsImplicitlySelectedSubtypes, int userId); boolean allowsImplicitlyEnabledSubtypes, int userId); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)") Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +6 −6 Original line number Diff line number Diff line Loading @@ -2167,13 +2167,13 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub * Gets enabled subtypes of the specified {@link InputMethodInfo}. * * @param imiId if null, returns enabled subtypes for the current {@link InputMethodInfo}. * @param allowsImplicitlySelectedSubtypes {@code true} to return the implicitly selected * @param allowsImplicitlyEnabledSubtypes {@code true} to return the implicitly enabled * subtypes. * @param userId the user ID to be queried about. */ @Override public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(String imiId, boolean allowsImplicitlySelectedSubtypes, @UserIdInt int userId) { boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId) { if (UserHandle.getCallingUserId() != userId) { mContext.enforceCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL, null); } Loading @@ -2182,7 +2182,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub final long ident = Binder.clearCallingIdentity(); try { return getEnabledInputMethodSubtypeListLocked(imiId, allowsImplicitlySelectedSubtypes, userId); allowsImplicitlyEnabledSubtypes, userId); } finally { Binder.restoreCallingIdentity(ident); } Loading @@ -2191,7 +2191,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub @GuardedBy("ImfLock.class") private List<InputMethodSubtype> getEnabledInputMethodSubtypeListLocked(String imiId, boolean allowsImplicitlySelectedSubtypes, @UserIdInt int userId) { boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId) { if (userId == mSettings.getCurrentUserId()) { final InputMethodInfo imi; String selectedMethodId = getSelectedMethodIdLocked(); Loading @@ -2204,7 +2204,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub return Collections.emptyList(); } return mSettings.getEnabledInputMethodSubtypeListLocked( imi, allowsImplicitlySelectedSubtypes); imi, allowsImplicitlyEnabledSubtypes); } final ArrayMap<String, InputMethodInfo> methodMap = queryMethodMapForUser(userId); final InputMethodInfo imi = methodMap.get(imiId); Loading @@ -2214,7 +2214,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub final InputMethodSettings settings = new InputMethodSettings(mContext, methodMap, userId, true); return settings.getEnabledInputMethodSubtypeListLocked( imi, allowsImplicitlySelectedSubtypes); imi, allowsImplicitlyEnabledSubtypes); } /** Loading services/core/java/com/android/server/inputmethod/InputMethodUtils.java +6 −6 Original line number Diff line number Diff line Loading @@ -415,10 +415,10 @@ final class InputMethodUtils { } List<InputMethodSubtype> getEnabledInputMethodSubtypeListLocked( InputMethodInfo imi, boolean allowsImplicitlySelectedSubtypes) { InputMethodInfo imi, boolean allowsImplicitlyEnabledSubtypes) { List<InputMethodSubtype> enabledSubtypes = getEnabledInputMethodSubtypeListLocked(imi); if (allowsImplicitlySelectedSubtypes && enabledSubtypes.isEmpty()) { if (allowsImplicitlyEnabledSubtypes && enabledSubtypes.isEmpty()) { enabledSubtypes = SubtypeUtils.getImplicitlyApplicableSubtypesLocked(mRes, imi); } return InputMethodSubtype.sort(imi, enabledSubtypes); Loading Loading @@ -669,12 +669,12 @@ final class InputMethodUtils { // If IME is enabled and no subtypes are enabled, applicable subtypes // are enabled implicitly, so needs to treat them to be enabled. if (imi != null && imi.getSubtypeCount() > 0) { List<InputMethodSubtype> implicitlySelectedSubtypes = List<InputMethodSubtype> implicitlyEnabledSubtypes = SubtypeUtils.getImplicitlyApplicableSubtypesLocked(mRes, imi); if (implicitlySelectedSubtypes != null) { final int N = implicitlySelectedSubtypes.size(); if (implicitlyEnabledSubtypes != null) { final int N = implicitlyEnabledSubtypes.size(); for (int i = 0; i < N; ++i) { final InputMethodSubtype st = implicitlySelectedSubtypes.get(i); final InputMethodSubtype st = implicitlyEnabledSubtypes.get(i); if (String.valueOf(st.hashCode()).equals(subtypeHashCode)) { return subtypeHashCode; } Loading Loading
core/java/android/view/inputmethod/IInputMethodManagerInvoker.java +2 −2 Original line number Diff line number Diff line Loading @@ -90,10 +90,10 @@ final class IInputMethodManagerInvoker { @AnyThread @NonNull List<InputMethodSubtype> getEnabledInputMethodSubtypeList(@Nullable String imiId, boolean allowsImplicitlySelectedSubtypes, @UserIdInt int userId) { boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId) { try { return mTarget.getEnabledInputMethodSubtypeList(imiId, allowsImplicitlySelectedSubtypes, userId); allowsImplicitlyEnabledSubtypes, userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
core/java/android/view/inputmethod/InputMethodManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -1578,16 +1578,16 @@ public final class InputMethodManager { * * @param imi The {@link InputMethodInfo} whose subtypes list will be returned. If {@code null}, * returns enabled subtypes for the currently selected {@link InputMethodInfo}. * @param allowsImplicitlySelectedSubtypes A boolean flag to allow to return the implicitly * selected subtypes. If an input method info doesn't have enabled subtypes, the framework * @param allowsImplicitlyEnabledSubtypes A boolean flag to allow to return the implicitly * enabled subtypes. If an input method info doesn't have enabled subtypes, the framework * will implicitly enable subtypes according to the current system language. */ @NonNull public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(@Nullable InputMethodInfo imi, boolean allowsImplicitlySelectedSubtypes) { boolean allowsImplicitlyEnabledSubtypes) { return mServiceInvoker.getEnabledInputMethodSubtypeList( imi == null ? null : imi.getId(), allowsImplicitlySelectedSubtypes, allowsImplicitlyEnabledSubtypes, UserHandle.myUserId()); } Loading
core/java/com/android/internal/view/IInputMethodManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ interface IInputMethodManager { @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)") List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in @nullable String imiId, boolean allowsImplicitlySelectedSubtypes, int userId); boolean allowsImplicitlyEnabledSubtypes, int userId); @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = " + "android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)") Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +6 −6 Original line number Diff line number Diff line Loading @@ -2167,13 +2167,13 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub * Gets enabled subtypes of the specified {@link InputMethodInfo}. * * @param imiId if null, returns enabled subtypes for the current {@link InputMethodInfo}. * @param allowsImplicitlySelectedSubtypes {@code true} to return the implicitly selected * @param allowsImplicitlyEnabledSubtypes {@code true} to return the implicitly enabled * subtypes. * @param userId the user ID to be queried about. */ @Override public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(String imiId, boolean allowsImplicitlySelectedSubtypes, @UserIdInt int userId) { boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId) { if (UserHandle.getCallingUserId() != userId) { mContext.enforceCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL, null); } Loading @@ -2182,7 +2182,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub final long ident = Binder.clearCallingIdentity(); try { return getEnabledInputMethodSubtypeListLocked(imiId, allowsImplicitlySelectedSubtypes, userId); allowsImplicitlyEnabledSubtypes, userId); } finally { Binder.restoreCallingIdentity(ident); } Loading @@ -2191,7 +2191,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub @GuardedBy("ImfLock.class") private List<InputMethodSubtype> getEnabledInputMethodSubtypeListLocked(String imiId, boolean allowsImplicitlySelectedSubtypes, @UserIdInt int userId) { boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId) { if (userId == mSettings.getCurrentUserId()) { final InputMethodInfo imi; String selectedMethodId = getSelectedMethodIdLocked(); Loading @@ -2204,7 +2204,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub return Collections.emptyList(); } return mSettings.getEnabledInputMethodSubtypeListLocked( imi, allowsImplicitlySelectedSubtypes); imi, allowsImplicitlyEnabledSubtypes); } final ArrayMap<String, InputMethodInfo> methodMap = queryMethodMapForUser(userId); final InputMethodInfo imi = methodMap.get(imiId); Loading @@ -2214,7 +2214,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub final InputMethodSettings settings = new InputMethodSettings(mContext, methodMap, userId, true); return settings.getEnabledInputMethodSubtypeListLocked( imi, allowsImplicitlySelectedSubtypes); imi, allowsImplicitlyEnabledSubtypes); } /** Loading
services/core/java/com/android/server/inputmethod/InputMethodUtils.java +6 −6 Original line number Diff line number Diff line Loading @@ -415,10 +415,10 @@ final class InputMethodUtils { } List<InputMethodSubtype> getEnabledInputMethodSubtypeListLocked( InputMethodInfo imi, boolean allowsImplicitlySelectedSubtypes) { InputMethodInfo imi, boolean allowsImplicitlyEnabledSubtypes) { List<InputMethodSubtype> enabledSubtypes = getEnabledInputMethodSubtypeListLocked(imi); if (allowsImplicitlySelectedSubtypes && enabledSubtypes.isEmpty()) { if (allowsImplicitlyEnabledSubtypes && enabledSubtypes.isEmpty()) { enabledSubtypes = SubtypeUtils.getImplicitlyApplicableSubtypesLocked(mRes, imi); } return InputMethodSubtype.sort(imi, enabledSubtypes); Loading Loading @@ -669,12 +669,12 @@ final class InputMethodUtils { // If IME is enabled and no subtypes are enabled, applicable subtypes // are enabled implicitly, so needs to treat them to be enabled. if (imi != null && imi.getSubtypeCount() > 0) { List<InputMethodSubtype> implicitlySelectedSubtypes = List<InputMethodSubtype> implicitlyEnabledSubtypes = SubtypeUtils.getImplicitlyApplicableSubtypesLocked(mRes, imi); if (implicitlySelectedSubtypes != null) { final int N = implicitlySelectedSubtypes.size(); if (implicitlyEnabledSubtypes != null) { final int N = implicitlyEnabledSubtypes.size(); for (int i = 0; i < N; ++i) { final InputMethodSubtype st = implicitlySelectedSubtypes.get(i); final InputMethodSubtype st = implicitlyEnabledSubtypes.get(i); if (String.valueOf(st.hashCode()).equals(subtypeHashCode)) { return subtypeHashCode; } Loading