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

Commit ecc18d14 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: I7484c6aa892666fc7489f9a156ff2a3f24d9f346
parents 2396437d 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