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

Commit 0d2041de authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Do not recreate ImeInputEventSender for the same channel" into sc-dev

parents 6c821692 85d8f5c6
Loading
Loading
Loading
Loading
+18 −10
Original line number Diff line number Diff line
@@ -1519,7 +1519,16 @@ public final class InputMethodManager {
    }

    void setInputChannelLocked(InputChannel channel) {
        if (mCurChannel != channel) {
        if (mCurChannel == channel) {
            return;
        }
        if (mCurChannel != null && channel != null
                && mCurChannel.getToken() == channel.getToken()) {
            // channel is a dupe of 'mCurChannel', because they have the same token, and represent
            // the same connection. Ignore the incoming channel and keep using 'mCurChannel' to
            // avoid confusing the InputEventReceiver.
            return;
        }
        if (mCurSender != null) {
            flushPendingEventsLocked();
            mCurSender.dispose();
@@ -1530,7 +1539,6 @@ public final class InputMethodManager {
        }
        mCurChannel = channel;
    }
    }

    /**
     * Reset all of the state associated with a served view being connected