Loading java/src/com/android/inputmethod/latin/LatinIME.java +10 −2 Original line number Diff line number Diff line Loading @@ -2122,8 +2122,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mVibrateOn = vibrator != null && vibrator.hasVibrator() && prefs.getBoolean(Settings.PREF_VIBRATE_ON, false); mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON, false); mPopupOn = prefs.getBoolean(Settings.PREF_POPUP_ON, mResources.getBoolean(R.bool.config_default_popup_preview)); mPopupOn = isPopupEnabled(prefs); mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true); mQuickFixes = isQuickFixesEnabled(prefs); Loading Loading @@ -2174,6 +2174,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mSuggest.setAutoCorrectionThreshold(autoCorrectionThreshold); } private boolean isPopupEnabled(SharedPreferences sp) { final boolean showPopupOption = getResources().getBoolean( R.bool.config_enable_show_popup_on_keypress_option); if (!showPopupOption) return mResources.getBoolean(R.bool.config_default_popup_preview); return sp.getBoolean(Settings.PREF_POPUP_ON, mResources.getBoolean(R.bool.config_default_popup_preview)); } private boolean isQuickFixesEnabled(SharedPreferences sp) { final boolean showQuickFixesOption = mResources.getBoolean( R.bool.config_enable_quick_fixes_option); Loading Loading
java/src/com/android/inputmethod/latin/LatinIME.java +10 −2 Original line number Diff line number Diff line Loading @@ -2122,8 +2122,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mVibrateOn = vibrator != null && vibrator.hasVibrator() && prefs.getBoolean(Settings.PREF_VIBRATE_ON, false); mSoundOn = prefs.getBoolean(Settings.PREF_SOUND_ON, false); mPopupOn = prefs.getBoolean(Settings.PREF_POPUP_ON, mResources.getBoolean(R.bool.config_default_popup_preview)); mPopupOn = isPopupEnabled(prefs); mAutoCap = prefs.getBoolean(Settings.PREF_AUTO_CAP, true); mQuickFixes = isQuickFixesEnabled(prefs); Loading Loading @@ -2174,6 +2174,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mSuggest.setAutoCorrectionThreshold(autoCorrectionThreshold); } private boolean isPopupEnabled(SharedPreferences sp) { final boolean showPopupOption = getResources().getBoolean( R.bool.config_enable_show_popup_on_keypress_option); if (!showPopupOption) return mResources.getBoolean(R.bool.config_default_popup_preview); return sp.getBoolean(Settings.PREF_POPUP_ON, mResources.getBoolean(R.bool.config_default_popup_preview)); } private boolean isQuickFixesEnabled(SharedPreferences sp) { final boolean showQuickFixesOption = mResources.getBoolean( R.bool.config_enable_quick_fixes_option); Loading