Remove the dependency to SpellCheckerProximityInfo from ProximityInfo.
In conjunction with I596b2deb Change-Id: I42f059158ae78e1c1c807ed4d3688edbcf18c006
This commit is contained in:
parent
d995452d2e
commit
88794b24c0
2 changed files with 7 additions and 8 deletions
|
@ -21,7 +21,6 @@ import android.text.TextUtils;
|
||||||
|
|
||||||
import com.android.inputmethod.keyboard.Keyboard.Params.TouchPositionCorrection;
|
import com.android.inputmethod.keyboard.Keyboard.Params.TouchPositionCorrection;
|
||||||
import com.android.inputmethod.latin.JniUtils;
|
import com.android.inputmethod.latin.JniUtils;
|
||||||
import com.android.inputmethod.latin.spellcheck.SpellCheckerProximityInfo;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -75,15 +74,12 @@ public class ProximityInfo {
|
||||||
return new ProximityInfo("", 1, 1, 1, 1, 1, 1, EMPTY_KEY_ARRAY, null);
|
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();
|
final ProximityInfo spellCheckerProximityInfo = createDummyProximityInfo();
|
||||||
spellCheckerProximityInfo.mNativeProximityInfo =
|
spellCheckerProximityInfo.mNativeProximityInfo =
|
||||||
spellCheckerProximityInfo.setProximityInfoNative("",
|
spellCheckerProximityInfo.setProximityInfoNative("",
|
||||||
SpellCheckerProximityInfo.ROW_SIZE,
|
rowSize, gridWidth, gridHeight, gridWidth, gridHeight,
|
||||||
SpellCheckerProximityInfo.PROXIMITY_GRID_WIDTH,
|
|
||||||
SpellCheckerProximityInfo.PROXIMITY_GRID_HEIGHT,
|
|
||||||
SpellCheckerProximityInfo.PROXIMITY_GRID_WIDTH,
|
|
||||||
SpellCheckerProximityInfo.PROXIMITY_GRID_HEIGHT,
|
|
||||||
1, proximity, 0, null, null, null, null, null, null, null, null);
|
1, proximity, 0, null, null, null, null, null, null, null, null);
|
||||||
return spellCheckerProximityInfo;
|
return spellCheckerProximityInfo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -392,7 +392,10 @@ public class AndroidSpellCheckerService extends SpellCheckerService
|
||||||
public DictAndProximity createDictAndProximity(final Locale locale) {
|
public DictAndProximity createDictAndProximity(final Locale locale) {
|
||||||
final int script = getScriptFromLocale(locale);
|
final int script = getScriptFromLocale(locale);
|
||||||
final ProximityInfo proximityInfo = ProximityInfo.createSpellCheckerProximityInfo(
|
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 =
|
final DictionaryCollection dictionaryCollection =
|
||||||
DictionaryFactory.createDictionaryFromManager(this, locale,
|
DictionaryFactory.createDictionaryFromManager(this, locale,
|
||||||
true /* useFullEditDistance */);
|
true /* useFullEditDistance */);
|
||||||
|
|
Loading…
Reference in a new issue