Skip to content
Snippets Groups Projects
Commit 52a7a415 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android Git Automerger
Browse files

am f590a497: Fix for 2295810: Auto-correction of English results in Englishman

Merge commit 'f590a497' into eclair-mr2-plus-aosp

* commit 'f590a497':
  Fix for 2295810: Auto-correction of English results in Englishman
parents b6095172 f590a497
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,6 @@ public class BinaryDictionary extends Dictionary {
private int mNativeDict;
private int[] mInputCodes = new int[MAX_WORD_LENGTH * MAX_ALTERNATIVES];
private WordCallback mWordCallback;
private char[] mOutputChars = new char[MAX_WORD_LENGTH * MAX_WORDS];
private int[] mFrequencies = new int[MAX_WORDS];
......@@ -75,7 +74,6 @@ public class BinaryDictionary extends Dictionary {
@Override
public void getWords(final WordComposer codes, final WordCallback callback) {
mWordCallback = callback;
final int codesSize = codes.size();
// Wont deal with really long words.
if (codesSize > MAX_WORD_LENGTH - 1) return;
......@@ -123,7 +121,7 @@ public class BinaryDictionary extends Dictionary {
@Override
public boolean isValidWord(CharSequence word) {
if (word == null) return false;
char[] chars = word.toString().toLowerCase().toCharArray();
char[] chars = word.toString().toCharArray();
return isValidWordNative(mNativeDict, chars, chars.length);
}
......
......@@ -809,7 +809,8 @@ public class LatinIME extends InputMethodService
//|| mCorrectionMode == mSuggest.CORRECTION_FULL;
CharSequence typedWord = mWord.getTypedWord();
// If we're in basic correct
boolean typedWordValid = mSuggest.isValidWord(typedWord);
boolean typedWordValid = mSuggest.isValidWord(typedWord) ||
(preferCapitalization() && mSuggest.isValidWord(typedWord.toString().toLowerCase()));
if (mCorrectionMode == Suggest.CORRECTION_FULL) {
correctionAvailable |= typedWordValid;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment