diff options
author | 2012-05-11 01:10:45 -0700 | |
---|---|---|
committer | 2012-05-11 01:10:45 -0700 | |
commit | 369ab4cd01be40a95832f42a650974b1dc767279 (patch) | |
tree | d492dde96b50cf437ba0c9ca3e6ccdf44630a878 /java/src | |
parent | 2b49579961198bc9416a8b02567362ca460303a7 (diff) | |
parent | 88794b24c0928e3bbea59999fce47c78c028863d (diff) | |
download | latinime-369ab4cd01be40a95832f42a650974b1dc767279.tar.gz latinime-369ab4cd01be40a95832f42a650974b1dc767279.tar.xz latinime-369ab4cd01be40a95832f42a650974b1dc767279.zip |
am 88794b24: Remove the dependency to SpellCheckerProximityInfo from ProximityInfo.
* commit '88794b24c0928e3bbea59999fce47c78c028863d':
Remove the dependency to SpellCheckerProximityInfo from ProximityInfo.
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/ProximityInfo.java | 10 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | 5 |
2 files changed, 7 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/ProximityInfo.java b/java/src/com/android/inputmethod/keyboard/ProximityInfo.java index 6b59a8dae..90394ce5e 100644 --- a/java/src/com/android/inputmethod/keyboard/ProximityInfo.java +++ b/java/src/com/android/inputmethod/keyboard/ProximityInfo.java @@ -21,7 +21,6 @@ import android.text.TextUtils; import com.android.inputmethod.keyboard.Keyboard.Params.TouchPositionCorrection; import com.android.inputmethod.latin.JniUtils; -import com.android.inputmethod.latin.spellcheck.SpellCheckerProximityInfo; import java.util.Arrays; import java.util.HashMap; @@ -75,15 +74,12 @@ public class ProximityInfo { return new ProximityInfo("", 1, 1, 1, 1, 1, 1, EMPTY_KEY_ARRAY, null); } - public static ProximityInfo createSpellCheckerProximityInfo(final int[] proximity) { + public static ProximityInfo createSpellCheckerProximityInfo(final int[] proximity, + int rowSize, int gridWidth, int gridHeight) { final ProximityInfo spellCheckerProximityInfo = createDummyProximityInfo(); spellCheckerProximityInfo.mNativeProximityInfo = spellCheckerProximityInfo.setProximityInfoNative("", - SpellCheckerProximityInfo.ROW_SIZE, - SpellCheckerProximityInfo.PROXIMITY_GRID_WIDTH, - SpellCheckerProximityInfo.PROXIMITY_GRID_HEIGHT, - SpellCheckerProximityInfo.PROXIMITY_GRID_WIDTH, - SpellCheckerProximityInfo.PROXIMITY_GRID_HEIGHT, + rowSize, gridWidth, gridHeight, gridWidth, gridHeight, 1, proximity, 0, null, null, null, null, null, null, null, null); return spellCheckerProximityInfo; } diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index f41645283..5b1ff050b 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -392,7 +392,10 @@ public class AndroidSpellCheckerService extends SpellCheckerService public DictAndProximity createDictAndProximity(final Locale locale) { final int script = getScriptFromLocale(locale); final ProximityInfo proximityInfo = ProximityInfo.createSpellCheckerProximityInfo( - SpellCheckerProximityInfo.getProximityForScript(script)); + SpellCheckerProximityInfo.getProximityForScript(script), + SpellCheckerProximityInfo.ROW_SIZE, + SpellCheckerProximityInfo.PROXIMITY_GRID_WIDTH, + SpellCheckerProximityInfo.PROXIMITY_GRID_HEIGHT); final DictionaryCollection dictionaryCollection = DictionaryFactory.createDictionaryFromManager(this, locale, true /* useFullEditDistance */); |