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

Commit e1ad9b60 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: Ia119aad23b5d6ff3d7333e1831fa00cb61ec5de1
parents b388f2bc 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