diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/res/drawable/ic_subtype_keyboard_fr_ch.png | bin | 0 -> 2367 bytes | |||
-rw-r--r-- | java/res/drawable/ic_subtype_us_keyboard.png | bin | 2390 -> 0 bytes | |||
-rw-r--r-- | java/res/values/strings.xml | 1 | ||||
-rw-r--r-- | java/res/xml/method.xml | 7 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 4 |
5 files changed, 9 insertions, 3 deletions
diff --git a/java/res/drawable/ic_subtype_keyboard_fr_ch.png b/java/res/drawable/ic_subtype_keyboard_fr_ch.png Binary files differnew file mode 100644 index 000000000..ef5fe4b3c --- /dev/null +++ b/java/res/drawable/ic_subtype_keyboard_fr_ch.png diff --git a/java/res/drawable/ic_subtype_us_keyboard.png b/java/res/drawable/ic_subtype_us_keyboard.png Binary files differdeleted file mode 100644 index 8ed6cc8b2..000000000 --- a/java/res/drawable/ic_subtype_us_keyboard.png +++ /dev/null diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 63c9f4213..a0d776517 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -402,6 +402,7 @@ <string name="subtype_mode_es_US_keyboard">Spanish (United States) Keyboard</string> <string name="subtype_mode_fr_keyboard">French Keyboard</string> <string name="subtype_mode_fr_CA_keyboard">French (Canada) Keyboard</string> + <string name="subtype_mode_fr_CH_keyboard">French (Switzerland) Keyboard</string> <string name="subtype_mode_it_keyboard">Italian Keyboard</string> <string name="subtype_mode_nb_keyboard">Norwegian Keyboard</string> <string name="subtype_mode_nl_keyboard">Dutch Keyboard</string> diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml index 1ec301b32..4ee60da51 100644 --- a/java/res/xml/method.xml +++ b/java/res/xml/method.xml @@ -20,7 +20,7 @@ <!-- The attributes in this XML file provide configuration information --> <!-- for the Input Method Manager. --> -<!-- Keyboard: en_US, cs, da, de, en_GB, es, es_US, fr, fr_CA, it, nb, nl, sr, sv --> +<!-- Keyboard: en_US, cs, da, de, en_GB, es, es_US, fr, fr_CA, fr_CH, it, nb, nl, sr, sv --> <!-- Voice: cs, da, de, en_AU, en_GB, en_IN, en_NZ, en_US, es, fr, ko, ja, pl, pt, ru, tr, zh_CN, zh_TW --> <!-- TODO: use <lang>_keyboard icon instead of a common keyboard icon. --> <!-- TODO: use <lang>_mic icon instead of a common mic icon. --> @@ -74,6 +74,11 @@ android:imeSubtypeLocale="fr_CA" android:imeSubtypeMode="keyboard" /> + <subtype android:icon="@drawable/ic_subtype_keyboard_fr_ch" + android:label="@string/subtype_mode_fr_CH_keyboard" + android:imeSubtypeLocale="fr_CH" + android:imeSubtypeMode="keyboard" + /> <subtype android:icon="@drawable/ic_subtype_keyboard_it" android:label="@string/subtype_mode_it_keyboard" android:imeSubtypeLocale="it" diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index cc8dfebe2..4ef19e831 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -641,7 +641,7 @@ public class LatinIME extends InputMethodService } private void checkReCorrectionOnStart() { - if (mReCorrectionEnabled && isPredictionOn()) { + if (mReCorrectionEnabled && isSuggestionShown() && isPredictionOn()) { // First get the cursor position. This is required by setOldSuggestions(), so that // it can pass the correct range to setComposingRegion(). At this point, we don't // have valid values for mLastSelectionStart/Stop because onUpdateSelection() has @@ -745,7 +745,7 @@ public class LatinIME extends InputMethodService mLastSelectionStart = newSelStart; mLastSelectionEnd = newSelEnd; - if (mReCorrectionEnabled) { + if (mReCorrectionEnabled && isSuggestionShown()) { // Don't look for corrections if the keyboard is not visible if (mKeyboardSwitcher.isInputViewShown()) { // Check if we should go in or out of correction mode. |