Merge "Close the current input method when attached view doesn't have a handler" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ebf7e2851c
@ -1078,8 +1078,11 @@ public final class InputMethodManager {
|
|||||||
Handler vh = view.getHandler();
|
Handler vh = view.getHandler();
|
||||||
if (vh == null) {
|
if (vh == null) {
|
||||||
// If the view doesn't have a handler, something has changed out
|
// If the view doesn't have a handler, something has changed out
|
||||||
// from under us, so just bail.
|
// from under us, so just close the current input.
|
||||||
if (DEBUG) Log.v(TAG, "ABORT input: no handler for view!");
|
// If we don't close the current input, the current input method can remain on the
|
||||||
|
// screen without a connection.
|
||||||
|
if (DEBUG) Log.v(TAG, "ABORT input: no handler for view! Close current input.");
|
||||||
|
closeCurrentInput();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (vh.getLooper() != Looper.myLooper()) {
|
if (vh.getLooper() != Looper.myLooper()) {
|
||||||
|
@ -1843,7 +1843,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
|
|
||||||
if (mCurFocusedWindow == windowToken) {
|
if (mCurFocusedWindow == windowToken) {
|
||||||
Slog.w(TAG, "Window already focused, ignoring focus gain of: " + client
|
Slog.w(TAG, "Window already focused, ignoring focus gain of: " + client
|
||||||
+ " attribute=" + attribute);
|
+ " attribute=" + attribute + ", token = " + windowToken);
|
||||||
if (attribute != null) {
|
if (attribute != null) {
|
||||||
return startInputUncheckedLocked(cs, inputContext, attribute,
|
return startInputUncheckedLocked(cs, inputContext, attribute,
|
||||||
controlFlags);
|
controlFlags);
|
||||||
|
Reference in New Issue
Block a user