am 23a7998e
: Not all cyrillic scripts use east_slavic layout.
* commit '23a7998edde3b25d4dc7a14b8a653ccd325d2405': Not all cyrillic scripts use east_slavic layout.
This commit is contained in:
commit
655436eb2c
1 changed files with 7 additions and 3 deletions
|
@ -125,7 +125,12 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
|
|||
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) {
|
||||
case ScriptUtils.SCRIPT_LATIN:
|
||||
return "qwerty";
|
||||
|
@ -247,8 +252,7 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
|
|||
}
|
||||
|
||||
private Keyboard createKeyboardForLocale(final Locale locale) {
|
||||
final int script = ScriptUtils.getScriptFromSpellCheckerLocale(locale);
|
||||
final String keyboardLayoutName = getKeyboardLayoutNameForScript(script);
|
||||
final String keyboardLayoutName = getKeyboardLayoutNameForLocale(locale);
|
||||
final InputMethodSubtype subtype = AdditionalSubtypeUtils.createDummyAdditionalSubtype(
|
||||
locale.toString(), keyboardLayoutName);
|
||||
final KeyboardLayoutSet keyboardLayoutSet = createKeyboardSetForSpellChecker(subtype);
|
||||
|
|
Loading…
Reference in a new issue