diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/res/values-sw600dp/config.xml | 1 | ||||
-rw-r--r-- | java/res/values-sw768dp/config.xml | 1 | ||||
-rw-r--r-- | java/res/values/config.xml | 4 | ||||
-rw-r--r-- | java/res/xml/prefs.xml | 2 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java | 5 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | 15 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java | 2 |
7 files changed, 16 insertions, 14 deletions
diff --git a/java/res/values-sw600dp/config.xml b/java/res/values-sw600dp/config.xml index a59167719..d539e0d82 100644 --- a/java/res/values-sw600dp/config.xml +++ b/java/res/values-sw600dp/config.xml @@ -23,7 +23,6 @@ <bool name="config_default_show_settings_key">false</bool> <bool name="config_enable_show_voice_key_option">false</bool> <bool name="config_enable_show_popup_on_keypress_option">false</bool> - <bool name="config_enable_show_recorrection_option">false</bool> <bool name="config_enable_bigram_suggestions_option">false</bool> <bool name="config_sliding_key_input_enabled">false</bool> <bool name="config_digit_popup_characters_enabled">false</bool> diff --git a/java/res/values-sw768dp/config.xml b/java/res/values-sw768dp/config.xml index 091d62e59..0f8f106b7 100644 --- a/java/res/values-sw768dp/config.xml +++ b/java/res/values-sw768dp/config.xml @@ -23,7 +23,6 @@ <bool name="config_default_show_settings_key">true</bool> <bool name="config_enable_show_voice_key_option">false</bool> <bool name="config_enable_show_popup_on_keypress_option">false</bool> - <bool name="config_enable_show_recorrection_option">false</bool> <bool name="config_enable_bigram_suggestions_option">false</bool> <bool name="config_sliding_key_input_enabled">false</bool> <bool name="config_digit_popup_characters_enabled">false</bool> diff --git a/java/res/values/config.xml b/java/res/values/config.xml index 472bc1e14..6327ede38 100644 --- a/java/res/values/config.xml +++ b/java/res/values/config.xml @@ -23,7 +23,7 @@ <bool name="config_default_show_settings_key">false</bool> <bool name="config_enable_show_voice_key_option">true</bool> <bool name="config_enable_show_popup_on_keypress_option">true</bool> - <bool name="config_enable_show_recorrection_option">true</bool> + <bool name="config_enable_show_recorrection_option">false</bool> <bool name="config_enable_bigram_suggestions_option">true</bool> <bool name="config_enable_usability_study_mode_option">false</bool> <bool name="config_sliding_key_input_enabled">true</bool> @@ -36,7 +36,7 @@ <!-- Default value for bigram prediction: after entering a word and a space only, should we look at input history to suggest a hopefully helpful candidate for the next word? --> <bool name="config_default_bigram_prediction">false</bool> - <bool name="config_default_recorrection_enabled">true</bool> + <bool name="config_default_compat_recorrection_enabled">true</bool> <bool name="config_default_sound_enabled">false</bool> <bool name="config_auto_correction_spacebar_led_enabled">true</bool> <bool name="config_auto_correction_suggestion_strip_visual_flash_enabled">false</bool> diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml index 84ceae6c7..6d2218d2f 100644 --- a/java/res/xml/prefs.xml +++ b/java/res/xml/prefs.xml @@ -48,7 +48,7 @@ android:title="@string/prefs_enable_recorrection" android:summary="@string/prefs_enable_recorrection_summary" android:persistent="true" - android:defaultValue="@bool/config_default_recorrection_enabled" /> + android:defaultValue="@bool/config_default_compat_recorrection_enabled" /> <CheckBoxPreference android:key="show_settings_key" android:title="@string/prefs_settings_key" diff --git a/java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java b/java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java index d40728d25..bf2512d7b 100644 --- a/java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java +++ b/java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java @@ -271,9 +271,10 @@ public class Recorrection implements SharedPreferences.OnSharedPreferenceChangeL // but always use the default setting defined in the resources. if (res.getBoolean(R.bool.config_enable_show_recorrection_option)) { mRecorrectionEnabled = prefs.getBoolean(Settings.PREF_RECORRECTION_ENABLED, - res.getBoolean(R.bool.config_default_recorrection_enabled)); + res.getBoolean(R.bool.config_default_compat_recorrection_enabled)); } else { - mRecorrectionEnabled = res.getBoolean(R.bool.config_default_recorrection_enabled); + mRecorrectionEnabled = + res.getBoolean(R.bool.config_default_compat_recorrection_enabled); } } diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 811470c26..21477a992 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -280,7 +280,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha mSymbolsKeyboardId = getKeyboardId(editorInfo, true, false, settingsValues); mSymbolsShiftedKeyboardId = getKeyboardId(editorInfo, true, true, settingsValues); setKeyboard(getKeyboard(mSavedKeyboardState.getKeyboardId())); - updateShiftState(); } catch (RuntimeException e) { Log.w(TAG, "loading keyboard failed: " + mMainKeyboardId, e); LatinImeLogger.logOnException(mMainKeyboardId.toString(), e); @@ -331,6 +330,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha final boolean localeChanged = (oldKeyboard == null) || !keyboard.mId.mLocale.equals(oldKeyboard.mId.mLocale); mInputMethodService.mHandler.startDisplayLanguageOnSpacebar(localeChanged); + updateShiftState(); } private int getSwitchState(KeyboardId id) { @@ -543,11 +543,12 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha } private void setAutomaticTemporaryUpperCase() { - LatinKeyboard latinKeyboard = getLatinKeyboard(); - if (latinKeyboard != null) { - latinKeyboard.setAutomaticTemporaryUpperCase(); - mKeyboardView.invalidateAllKeys(); + if (mKeyboardView == null) return; + final Keyboard keyboard = mKeyboardView.getKeyboard(); + if (keyboard != null) { + keyboard.setAutomaticTemporaryUpperCase(); } + mKeyboardView.invalidateAllKeys(); } /** @@ -559,7 +560,9 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha Log.d(TAG, "updateShiftState:" + " autoCaps=" + mInputMethodService.getCurrentAutoCapsState() + " keyboard=" + getLatinKeyboard().getKeyboardShiftState() - + " shiftKeyState=" + shiftKeyState); + + " shiftKeyState=" + shiftKeyState + + " isAlphabetMode=" + isAlphabetMode() + + " isShiftLocked=" + isShiftLocked()); if (isAlphabetMode()) { if (!isShiftLocked() && !shiftKeyState.isIgnoring()) { if (shiftKeyState.isReleasing() && mInputMethodService.getCurrentAutoCapsState()) { diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java index 0cde4e5b5..fd98456a8 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java @@ -21,7 +21,7 @@ import android.util.Log; import com.android.inputmethod.keyboard.KeyboardSwitcher; public class KeyboardShiftState { - private static final String TAG = "KeyboardShiftState"; + private static final String TAG = KeyboardShiftState.class.getSimpleName(); private static final boolean DEBUG = KeyboardSwitcher.DEBUG_STATE; private static final int NORMAL = 0; |