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

Commit 7c20f12b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Do not recreate ImeInputEventSender for the same channel" into sc-dev am: 0d2041de

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14229516

Change-Id: I35c3033283b074a163742d728283165089688ff6
parents c02813c7 0d2041de
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