From 3895d7f8dc2e4999947f61220b86fa148f433413 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Wed, 2 Jul 2014 13:29:36 +0900 Subject: Additional subtype ID should be independent of OS-version This CL consolidates the initialization logic for additional subtypes so that each additional subtypes can have predictable subtype ID regardless of OS version. Previously subtype IDs for additional subtypes are calculated differently depending on the running OS version with hoping it minimizes the risk of compatibility issues. However, it is getting harder and harder to maintain slightly different logic between OSes. Thus we decided to unify the logic into that in KitKat even though it may causes some breaking changes. Note that the actual extra values that are used to instantiate InputMethodSubtype object are still determined on the fly depending on the running OS version. However these actual extra values are no longer used for the subtype ID calculation. BUG: 16000850 Change-Id: Id3c262386a7bc7ed75966b1395a50171abe550d3 --- .../inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java') diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index b57eab31b..90c8f618f 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -374,8 +374,8 @@ public final class AndroidSpellCheckerService extends SpellCheckerService public DictAndKeyboard createDictAndKeyboard(final Locale locale) { final int script = ScriptUtils.getScriptFromSpellCheckerLocale(locale); final String keyboardLayoutName = getKeyboardLayoutNameForScript(script); - final InputMethodSubtype subtype = AdditionalSubtypeUtils.createAdditionalSubtype( - locale.toString(), keyboardLayoutName, null); + final InputMethodSubtype subtype = AdditionalSubtypeUtils.createDummyAdditionalSubtype( + locale.toString(), keyboardLayoutName); final KeyboardLayoutSet keyboardLayoutSet = createKeyboardSetForSpellChecker(subtype); final DictionaryCollection dictionaryCollection = -- cgit v1.2.3-83-g751a