aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-03-08 17:07:02 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-03-08 20:30:38 +0900
commitcc8c8b99bd0463f5977dea82f5e2379ea1dd4e73 (patch)
tree51098aa01dc63b0629a674a8adace0ea5b1ef064 /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
parent3e2d385810ca5a36a21dc6af661381c1ca27cc86 (diff)
downloadlatinime-cc8c8b99bd0463f5977dea82f5e2379ea1dd4e73.tar.gz
latinime-cc8c8b99bd0463f5977dea82f5e2379ea1dd4e73.tar.xz
latinime-cc8c8b99bd0463f5977dea82f5e2379ea1dd4e73.zip
Split Utils class to StringUtils, SubtypeUtils, and JniUtils
Change-Id: I09e91675fe7d573dad8c933ad513b21d7e409144
Diffstat (limited to 'java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java')
-rw-r--r--java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index 755c75b2e..35a5c0f52 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -37,9 +37,9 @@ import com.android.inputmethod.latin.DictionaryFactory;
import com.android.inputmethod.latin.Flag;
import com.android.inputmethod.latin.LocaleUtils;
import com.android.inputmethod.latin.R;
+import com.android.inputmethod.latin.StringUtils;
import com.android.inputmethod.latin.SynchronouslyLoadedContactsDictionary;
import com.android.inputmethod.latin.SynchronouslyLoadedUserDictionary;
-import com.android.inputmethod.latin.Utils;
import com.android.inputmethod.latin.WhitelistDictionary;
import com.android.inputmethod.latin.WordComposer;
@@ -47,11 +47,11 @@ import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
-import java.util.HashSet;
/**
* Service for spell checking, using LatinIME's dictionaries and mechanisms.
@@ -316,7 +316,7 @@ public class AndroidSpellCheckerService extends SpellCheckerService
}
}
Collections.reverse(mSuggestions);
- Utils.removeDupes(mSuggestions);
+ StringUtils.removeDupes(mSuggestions);
if (CAPITALIZE_ALL == capitalizeType) {
for (int i = 0; i < mSuggestions.size(); ++i) {
// get(i) returns a CharSequence which is actually a String so .toString()
@@ -326,7 +326,7 @@ public class AndroidSpellCheckerService extends SpellCheckerService
} else if (CAPITALIZE_FIRST == capitalizeType) {
for (int i = 0; i < mSuggestions.size(); ++i) {
// Likewise
- mSuggestions.set(i, Utils.toTitleCase(mSuggestions.get(i).toString(),
+ mSuggestions.set(i, StringUtils.toTitleCase(mSuggestions.get(i).toString(),
locale));
}
}
@@ -396,7 +396,7 @@ public class AndroidSpellCheckerService extends SpellCheckerService
final ProximityInfo proximityInfo = ProximityInfo.createSpellCheckerProximityInfo(
SpellCheckerProximityInfo.getProximityForScript(script));
final Resources resources = getResources();
- final int fallbackResourceId = Utils.getMainDictionaryResourceId(resources);
+ final int fallbackResourceId = DictionaryFactory.getMainDictionaryResourceId(resources);
final DictionaryCollection dictionaryCollection =
DictionaryFactory.createDictionaryFromManager(this, locale, fallbackResourceId,
USE_FULL_EDIT_DISTANCE_FLAG_ARRAY);