Loading core/java/android/view/inputmethod/flags.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,17 @@ flag { } } flag { name: "consistent_get_current_input_method_info" namespace: "input_method" description: "Use BindingController as the source of truth in getCurrentInputMethodInfo" bug: "355034523" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "ime_switcher_revamp" is_exported: true Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +10 −1 Original line number Diff line number Diff line Loading @@ -1536,7 +1536,16 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. Manifest.permission.INTERACT_ACROSS_USERS_FULL, null); } final InputMethodSettings settings = InputMethodSettingsRepository.get(userId); return settings.getMethodMap().get(settings.getSelectedInputMethod()); final String selectedImeId; if (Flags.consistentGetCurrentInputMethodInfo()) { final var bindingController = getInputMethodBindingController(userId); synchronized (ImfLock.class) { selectedImeId = bindingController.getSelectedMethodId(); } } else { selectedImeId = settings.getSelectedInputMethod(); } return settings.getMethodMap().get(selectedImeId); } @BinderThread Loading Loading
core/java/android/view/inputmethod/flags.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,17 @@ flag { } } flag { name: "consistent_get_current_input_method_info" namespace: "input_method" description: "Use BindingController as the source of truth in getCurrentInputMethodInfo" bug: "355034523" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "ime_switcher_revamp" is_exported: true Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +10 −1 Original line number Diff line number Diff line Loading @@ -1536,7 +1536,16 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. Manifest.permission.INTERACT_ACROSS_USERS_FULL, null); } final InputMethodSettings settings = InputMethodSettingsRepository.get(userId); return settings.getMethodMap().get(settings.getSelectedInputMethod()); final String selectedImeId; if (Flags.consistentGetCurrentInputMethodInfo()) { final var bindingController = getInputMethodBindingController(userId); synchronized (ImfLock.class) { selectedImeId = bindingController.getSelectedMethodId(); } } else { selectedImeId = settings.getSelectedInputMethod(); } return settings.getMethodMap().get(selectedImeId); } @BinderThread Loading