diff options
author | 2013-05-15 11:40:41 -0700 | |
---|---|---|
committer | 2013-05-15 11:40:41 -0700 | |
commit | c363302eb7ee43c8ab025a799b84b85c2069b2f7 (patch) | |
tree | e96d70dcff952ec923910747eda6f2e40bd413ce /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | |
parent | 1e08d3d25930696e4614db53765d063a67e2b09a (diff) | |
parent | 3ac40c6ae4c6288fec50ed09549cb7a39c816ee0 (diff) | |
download | latinime-c363302eb7ee43c8ab025a799b84b85c2069b2f7.tar.gz latinime-c363302eb7ee43c8ab025a799b84b85c2069b2f7.tar.xz latinime-c363302eb7ee43c8ab025a799b84b85c2069b2f7.zip |
Merge commit '3ac40c6a' into jb-mr2-dev-plus-aosp
Conflicts:
java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
Conflict resolved by matching code with jb-mr2-dev.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index 166705954..aa60496ae 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -64,8 +64,6 @@ public final class AndroidSpellCheckerService extends SpellCheckerService CollectionUtils.newSynchronizedTreeMap(); private ContactsBinaryDictionary mContactsDictionary; - // The threshold for a candidate to be offered as a suggestion. - private float mSuggestionThreshold; // The threshold for a suggestion to be considered "recommended". private float mRecommendedThreshold; // Whether to use the contacts dictionary @@ -112,8 +110,6 @@ public final class AndroidSpellCheckerService extends SpellCheckerService @Override public void onCreate() { super.onCreate(); - mSuggestionThreshold = - Float.parseFloat(getString(R.string.spellchecker_suggestion_threshold_value)); mRecommendedThreshold = Float.parseFloat(getString(R.string.spellchecker_recommended_threshold_value)); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); @@ -198,8 +194,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService } public SuggestionsGatherer newSuggestionsGatherer(final String text, int maxLength) { - return new SuggestionsGatherer( - text, mSuggestionThreshold, mRecommendedThreshold, maxLength); + return new SuggestionsGatherer(text, mRecommendedThreshold, maxLength); } // TODO: remove this class and replace it by storage local to the session. @@ -217,7 +212,6 @@ public final class AndroidSpellCheckerService extends SpellCheckerService private final ArrayList<String> mSuggestions; private final int[] mScores; private final String mOriginalText; - private final float mSuggestionThreshold; private final float mRecommendedThreshold; private final int mMaxLength; private int mLength = 0; @@ -227,10 +221,9 @@ public final class AndroidSpellCheckerService extends SpellCheckerService private String mBestSuggestion = null; private int mBestScore = Integer.MIN_VALUE; // As small as possible - SuggestionsGatherer(final String originalText, final float suggestionThreshold, - final float recommendedThreshold, final int maxLength) { + SuggestionsGatherer(final String originalText, final float recommendedThreshold, + final int maxLength) { mOriginalText = originalText; - mSuggestionThreshold = suggestionThreshold; mRecommendedThreshold = recommendedThreshold; mMaxLength = maxLength; mSuggestions = CollectionUtils.newArrayList(maxLength + 1); |