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

Commit da10d15c authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make sure to call back View#onCheckIsTextEditor() on the UI thread"...

Merge "Make sure to call back View#onCheckIsTextEditor() on the UI thread" into udc-dev am: 6e1bc14f

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



Change-Id: Ia910f91dd2fec5a4ab1f391b3a952c1b5f883f49
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d9eea8b8 6e1bc14f
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -2657,17 +2657,6 @@ public final class InputMethodManager {
            }
        }

        if (windowGainingFocus == null) {
            windowGainingFocus = view.getWindowToken();
            if (windowGainingFocus == null) {
                Log.e(TAG, "ABORT input: ServedView must be attached to a Window");
                return false;
            }
            startInputFlags = getStartInputFlags(view, startInputFlags);
            softInputMode = view.getViewRootImpl().mWindowAttributes.softInputMode;
            windowFlags = view.getViewRootImpl().mWindowAttributes.flags;
        }

        // Now we need to get an input connection from the served view.
        // This is complicated in a couple ways: we can't be holding our lock
        // when calling out to the view, and we need to make sure we call into
@@ -2690,6 +2679,17 @@ public final class InputMethodManager {
            return false;
        }

        if (windowGainingFocus == null) {
            windowGainingFocus = view.getWindowToken();
            if (windowGainingFocus == null) {
                Log.e(TAG, "ABORT input: ServedView must be attached to a Window");
                return false;
            }
            startInputFlags = getStartInputFlags(view, startInputFlags);
            softInputMode = view.getViewRootImpl().mWindowAttributes.softInputMode;
            windowFlags = view.getViewRootImpl().mWindowAttributes.flags;
        }

        // Okay we are now ready to call into the served view and have it
        // do its stuff.
        // Life is good: let's hook everything up!