aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-01-30 22:59:14 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-30 22:59:14 -0800
commit7b6cdacf4d36fa7ab21a98a95b9d44882886c890 (patch)
treee15f9bd022abe4a6e0b9c43535e108e29213dc27 /java/src
parent20e3e0362804e1ba9fa0db7a9514005480a0f33a (diff)
parent728115493e14f84d5f02a4812c8086a378813364 (diff)
downloadlatinime-7b6cdacf4d36fa7ab21a98a95b9d44882886c890.tar.gz
latinime-7b6cdacf4d36fa7ab21a98a95b9d44882886c890.tar.xz
latinime-7b6cdacf4d36fa7ab21a98a95b9d44882886c890.zip
am 72811549: Do not read the pop up setting if the config says not to.
* commit '728115493e14f84d5f02a4812c8086a378813364': Do not read the pop up setting if the config says not to.
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 8166e0b4e..5ce1b7e95 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -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);
@@ -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);