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

Commit dc620a6d authored by Adrian Roos's avatar Adrian Roos Committed by Android (Google) Code Review
Browse files

Merge "Prevent IMEs from switching to another IME that isn't enabled"

parents 9cd8f757 55f6a873
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4591,6 +4591,13 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
            Slog.w(TAG, "Ignoring setInputMethod of uid " + Binder.getCallingUid()
                    + " token: " + token);
            return;
        } else {
            // Called with current IME's token.
            if (mMethodMap.get(id) != null
                    && mSettings.getEnabledInputMethodListWithFilterLocked(
                            (info) -> info.getId().equals(id)).isEmpty()) {
                throw new IllegalStateException("Requested IME is not enabled: " + id);
            }
        }

        final long ident = Binder.clearCallingIdentity();