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

Commit b4724179 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Fix session race due to pending user-switch task" into rvc-dev am: 243ac3d3 am: 40dba2d3

Change-Id: I4e5b48b36a8600771ee275b1b0d46669c8abdcc8
parents 893ed65e 40dba2d3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2480,6 +2480,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    void onSessionCreated(IInputMethod method, IInputMethodSession session,
            InputChannel channel) {
        synchronized (mMethodMap) {
            if (mUserSwitchHandlerTask != null) {
                // We have a pending user-switching task so it's better to just ignore this session.
                channel.dispose();
                return;
            }
            if (mCurMethod != null && method != null
                    && mCurMethod.asBinder() == method.asBinder()) {
                if (mCurClient != null) {