diff options
author | 2012-08-15 02:38:41 -0700 | |
---|---|---|
committer | 2012-08-15 02:38:41 -0700 | |
commit | c15fa010fdae117fd507270cab54b26c8052e797 (patch) | |
tree | ba7526cdebfb59399d020417bf33f30baae38542 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | a01d0212d6c3bd2e68ac82f97abc82aace0f2973 (diff) | |
parent | e3884b041d24fb3dd4f9b53ddfb86cace75b450a (diff) | |
download | latinime-c15fa010fdae117fd507270cab54b26c8052e797.tar.gz latinime-c15fa010fdae117fd507270cab54b26c8052e797.tar.xz latinime-c15fa010fdae117fd507270cab54b26c8052e797.zip |
am e3884b04: am 91c64902: Merge "Refresh editor info when the text field attributes changes." into jb-mr1-dev
* commit 'e3884b041d24fb3dd4f9b53ddfb86cace75b450a':
Refresh editor info when the text field attributes changes.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 6abe9435f..6fbd2a222 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -670,7 +670,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen accessUtils.onStartInputViewInternal(mainKeyboardView, editorInfo, restarting); } - if (!restarting) { + final boolean selectionChanged = mLastSelectionStart != editorInfo.initialSelStart + || mLastSelectionEnd != editorInfo.initialSelEnd; + final boolean inputTypeChanged = !mCurrentSettings.isSameInputType(editorInfo); + final boolean isDifferentTextField = !restarting || inputTypeChanged; + if (isDifferentTextField) { mSubtypeSwitcher.updateParametersOnStartInputView(); } @@ -679,9 +683,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen updateFullscreenMode(); mApplicationSpecifiedCompletions = null; - final boolean selectionChanged = mLastSelectionStart != editorInfo.initialSelStart - || mLastSelectionEnd != editorInfo.initialSelEnd; - if (!restarting || selectionChanged) { + if (isDifferentTextField || selectionChanged) { // If the selection changed, we reset the input state. Essentially, we come here with // restarting == true when the app called setText() or similar. We should reset the // state if the app set the text to something else, but keep it if it set a suggestion @@ -696,7 +698,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } - if (!restarting) { + if (isDifferentTextField) { mainKeyboardView.closing(); loadSettings(); |