Not all cyrillic scripts use east_slavic layout.
Bug 19963288. Change-Id: I6d61110be11b260a4ec8e8c85fa0a32064e051e3main
parent
1b8cd52d7f
commit
23a7998edd
|
@ -125,7 +125,12 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
|
||||||
return mRecommendedThreshold;
|
return mRecommendedThreshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getKeyboardLayoutNameForScript(final int script) {
|
private static String getKeyboardLayoutNameForLocale(final Locale locale) {
|
||||||
|
// See b/19963288.
|
||||||
|
if (locale.getLanguage().equals("sr")) {
|
||||||
|
return "south_slavic";
|
||||||
|
}
|
||||||
|
final int script = ScriptUtils.getScriptFromSpellCheckerLocale(locale);
|
||||||
switch (script) {
|
switch (script) {
|
||||||
case ScriptUtils.SCRIPT_LATIN:
|
case ScriptUtils.SCRIPT_LATIN:
|
||||||
return "qwerty";
|
return "qwerty";
|
||||||
|
@ -247,8 +252,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
|
||||||
}
|
}
|
||||||
|
|
||||||
private Keyboard createKeyboardForLocale(final Locale locale) {
|
private Keyboard createKeyboardForLocale(final Locale locale) {
|
||||||
final int script = ScriptUtils.getScriptFromSpellCheckerLocale(locale);
|
final String keyboardLayoutName = getKeyboardLayoutNameForLocale(locale);
|
||||||
final String keyboardLayoutName = getKeyboardLayoutNameForScript(script);
|
|
||||||
final InputMethodSubtype subtype = AdditionalSubtypeUtils.createDummyAdditionalSubtype(
|
final InputMethodSubtype subtype = AdditionalSubtypeUtils.createDummyAdditionalSubtype(
|
||||||
locale.toString(), keyboardLayoutName);
|
locale.toString(), keyboardLayoutName);
|
||||||
final KeyboardLayoutSet keyboardLayoutSet = createKeyboardSetForSpellChecker(subtype);
|
final KeyboardLayoutSet keyboardLayoutSet = createKeyboardSetForSpellChecker(subtype);
|
||||||
|
|
Loading…
Reference in New Issue