diff options
Diffstat (limited to 'java/src')
3 files changed, 7 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index 18e712212..dbc2b9082 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -141,7 +141,6 @@ public final class BinaryDictionary extends Dictionary { mOutputTypes); final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList(); for (int j = 0; j < count; ++j) { - if (composerSize > 0 && mOutputScores[j] < 1) break; final int start = j * MAX_WORD_LENGTH; int len = 0; while (len < MAX_WORD_LENGTH && mOutputCodePoints[start + len] != 0) { diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 16eab4bc4..5ef2120c6 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -929,8 +929,11 @@ public final class LatinIME extends InputMethodService implements KeyboardAction resetEntireInputState(newSelStart); } - // We moved the cursor. If we are touching a word, we need to resume suggestion. - mHandler.postResumeSuggestions(); + // We moved the cursor. If we are touching a word, we need to resume suggestion, + // unless suggestions are off. + if (isSuggestionsStripVisible()) { + mHandler.postResumeSuggestions(); + } // Reset the last recapitalization. mRecapitalizeStatus.deactivate(); mKeyboardSwitcher.updateShiftState(); @@ -2108,6 +2111,8 @@ public final class LatinIME extends InputMethodService implements KeyboardAction return false; if (mSuggestionStripView.isShowingAddToDictionaryHint()) return true; + if (null == mSettings.getCurrent()) + return false; if (!mSettings.getCurrent().isSuggestionStripVisibleInOrientation(mDisplayOrientation)) return false; if (mSettings.getCurrent().isApplicationSpecifiedCompletionsOn()) diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index 2d0a89bb3..166705954 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -267,16 +267,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService return true; } - // Compute the normalized score and skip this word if it's normalized score does not - // make the threshold. final String wordString = new String(word, wordOffset, wordLength); - final float normalizedScore = - BinaryDictionary.calcNormalizedScore(mOriginalText, wordString, score); - if (normalizedScore < mSuggestionThreshold) { - if (DBG) Log.i(TAG, wordString + " does not make the score threshold"); - return true; - } - if (mLength < mMaxLength) { final int copyLen = mLength - insertIndex; ++mLength; |