diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/res/values/strings.xml | 6 | ||||
-rw-r--r-- | java/res/xml/spellchecker.xml | 6 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/Key.java | 7 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 7 |
4 files changed, 12 insertions, 14 deletions
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 516c60731..d8a3a689e 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -27,8 +27,10 @@ <!-- Title for Latin keyboard input options dialog [CHAR LIMIT=25] --> <string name="english_ime_input_options">Input options</string> - <!-- Title for Latin Keyboard spell checker service --> - <string name="spell_checker_service_name">Android correction</string> + <!-- Name of Android spell checker service --> + <string name="spell_checker_service_name">Android spell checker</string> + <!-- Name of Android spell checker service. AOSP(Android Open Source Project) should not be translated. --> + <string name="aosp_spell_checker_service_name">Android spell checker (AOSP)</string> <!-- Title for the spell checking service settings screen --> <string name="android_spell_checker_settings">Spell checking settings</string> diff --git a/java/res/xml/spellchecker.xml b/java/res/xml/spellchecker.xml index b48dc52cd..2e4448c44 100644 --- a/java/res/xml/spellchecker.xml +++ b/java/res/xml/spellchecker.xml @@ -17,11 +17,11 @@ */ --> -<!-- The attributes in this XML file provide the configuration information --> -<!-- for the spell checker --> +<!-- The attributes in this XML file provide the configuration information + for the spell checker --> <spell-checker xmlns:android="http://schemas.android.com/apk/res/android" - android:label="@string/spell_checker_service_name" + android:label="@string/aosp_spell_checker_service_name" android:settingsActivity="com.android.inputmethod.latin.spellcheck.SpellCheckerSettingsActivity"> <subtype android:label="@string/subtype_generic" diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index b8d04e0f5..79c7ce0fd 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -558,11 +558,8 @@ public class Key { } public Drawable getIcon(KeyboardIconsSet iconSet) { - return iconSet.getIconDrawable(mIconId); - } - - public Drawable getDisabledIcon(KeyboardIconsSet iconSet) { - return iconSet.getIconDrawable(mDisabledIconId); + final int iconId = mEnabled ? mIconId : mDisabledIconId; + return iconSet.getIconDrawable(iconId); } public Drawable getPreviewIcon(KeyboardIconsSet iconSet) { diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 59fa66ded..edc4efd1a 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1114,12 +1114,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // and the composingStateManager about it. private void resetEntireInputState() { resetComposingState(true /* alsoResetLastComposedWord */); + mComposingStateManager.onFinishComposingText(); updateSuggestions(); final InputConnection ic = getCurrentInputConnection(); if (ic != null) { ic.finishComposingText(); } - mComposingStateManager.onFinishComposingText(); mVoiceProxy.setVoiceInputHighlighted(false); } @@ -1536,8 +1536,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // it entirely and resume suggestions on the previous word, we'd like to still // have touch coordinates for it. resetComposingState(false /* alsoResetLastComposedWord */); - clearSuggestions(); mComposingStateManager.onFinishComposingText(); + clearSuggestions(); } } if (isComposingWord) { @@ -1897,12 +1897,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mSuggestionsView.clear(); } mKeyboardSwitcher.updateShiftState(); + resetComposingState(true /* alsoResetLastComposedWord */); final InputConnection ic = getCurrentInputConnection(); if (ic != null) { - ic.beginBatchEdit(); final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index]; ic.commitCompletion(completionInfo); - ic.endBatchEdit(); } return; } |