Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d60af928 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make SKC#setInputMethodEnabled() consistent among users" into main

parents 43cd267a ed8f4ce1
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -5859,24 +5859,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
                if (!settings.getMethodMap().containsKey(imeId)) {
                    return false; // IME is not found.
                }
                if (userId == mCurrentUserId) {
                setInputMethodEnabledLocked(imeId, enabled, userId);
                return true;
            }
                if (enabled) {
                    final String enabledImeIdsStr = settings.getEnabledInputMethodsStr();
                    final String newEnabledImeIdsStr = InputMethodUtils.concatEnabledImeIds(
                            enabledImeIdsStr, imeId);
                    if (!TextUtils.equals(enabledImeIdsStr, newEnabledImeIdsStr)) {
                        settings.putEnabledInputMethodsStr(newEnabledImeIdsStr);
                    }
                } else {
                    settings.buildAndPutEnabledInputMethodsStrRemovingId(
                            new StringBuilder(),
                            settings.getEnabledInputMethodsAndSubtypeList(), imeId);
                }
                return true;
            }
        }

        @Override