summaryrefslogtreecommitdiff
path: root/core/java/android/view/inputmethod
diff options
context:
space:
mode:
authorsatok <satok@google.com>2012-03-22 15:34:16 +0900
committersatok <satok@google.com>2012-03-22 15:34:16 +0900
commit31e4e149941e34cd135dfa0b6d918cc0b3dabbbc (patch)
treec3a661f6530df8aee3539f8803d6ef999defaf7f /core/java/android/view/inputmethod
parentb106153ba97f3eded6e71ffc92859314b614e0ba (diff)
Re-start input when the IME is deactivated but window is focused
Bug: 6188159 Change-Id: I9189e6d2ac90aa8c621fdb44989728101e00329d
Diffstat (limited to 'core/java/android/view/inputmethod')
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 0e5ff20dd0ef..17dbde82ad04 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -403,6 +403,9 @@ public final class InputMethodManager {
mIInputContext.finishComposingText();
} catch (RemoteException e) {
}
+ // Check focus again in case that "onWindowFocus" is called before
+ // handling this message.
+ checkFocus(mHasBeenInactive);
}
}
return;
@@ -1173,13 +1176,17 @@ public final class InputMethodManager {
}
}
+ private void checkFocus(boolean forceNewFocus) {
+ if (checkFocusNoStartInput(forceNewFocus)) {
+ startInputInner(null, 0, 0, 0);
+ }
+ }
+
/**
* @hide
*/
public void checkFocus() {
- if (checkFocusNoStartInput(false)) {
- startInputInner(null, 0, 0, 0);
- }
+ checkFocus(false);
}
private boolean checkFocusNoStartInput(boolean forceNewFocus) {