diff options
author | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-11-18 09:23:07 +0800 |
---|---|---|
committer | Adrian DC <radian.dc@gmail.com> | 2016-12-03 22:09:23 +0100 |
commit | 6d9c8b34e8403e8659b4e470f3a744dc00d84c86 (patch) | |
tree | 9174f2829f777c41b339c481e72cb9dfd40ffd9a | |
parent | 0e6653a9dc5f27668c9a77dc69c69ea12be3b4db (diff) | |
download | android_packages_inputmethods_LatinIME-6d9c8b34e8403e8659b4e470f3a744dc00d84c86.tar.gz android_packages_inputmethods_LatinIME-6d9c8b34e8403e8659b4e470f3a744dc00d84c86.tar.bz2 android_packages_inputmethods_LatinIME-6d9c8b34e8403e8659b4e470f3a744dc00d84c86.zip |
LatinIME: Remove gesture preference if gesture lib is unavailablestable/cm-13.0-ZNH5Y
Gesture typing won't work without the gesture library,
so remove the preference to not mislead users
into thinking that gesture typing is supported.
RM-290
Change-Id: I387ae83fd174b57fc48fe7bcfc37e3010ce89b12
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/Settings.java | 1 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/SettingsFragment.java | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java index 5c1b56883..13573b0d7 100644 --- a/java/src/com/android/inputmethod/latin/settings/Settings.java +++ b/java/src/com/android/inputmethod/latin/settings/Settings.java @@ -49,6 +49,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang public static final String SCREEN_ACCOUNTS = "screen_accounts"; public static final String SCREEN_THEME = "screen_theme"; public static final String SCREEN_DEBUG = "screen_debug"; + public static final String SCREEN_GESTURE = "screen_gesture"; // In the same order as xml/prefs.xml public static final String PREF_AUTO_CAP = "auto_cap"; public static final String PREF_VIBRATE_ON = "vibrate_on"; diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java index 874f221c6..35ca1cf6b 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java @@ -31,6 +31,7 @@ import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.define.ProductionFlags; import com.android.inputmethod.latin.utils.ApplicationUtils; import com.android.inputmethod.latin.utils.FeedbackUtils; +import com.android.inputmethod.latin.utils.JniUtils; import com.android.inputmethodcommon.InputMethodSettingsFragment; public final class SettingsFragment extends InputMethodSettingsFragment { @@ -55,6 +56,10 @@ public final class SettingsFragment extends InputMethodSettingsFragment { final Preference accountsPreference = findPreference(Settings.SCREEN_ACCOUNTS); preferenceScreen.removePreference(accountsPreference); } + if (!JniUtils.mHaveGestureLib) { + final Preference gesturePreference = findPreference(Settings.SCREEN_GESTURE); + preferenceScreen.removePreference(gesturePreference); + } } @Override |