Merge "Make sure to call back View#onCheckIsTextEditor() on the UI thread" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6e1bc14f58
@@ -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.
|
// 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
|
// 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
|
// 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;
|
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
|
// Okay we are now ready to call into the served view and have it
|
||||||
// do its stuff.
|
// do its stuff.
|
||||||
// Life is good: let's hook everything up!
|
// Life is good: let's hook everything up!
|
||||||
|
|||||||
Reference in New Issue
Block a user