From 0b916be981f926661c9e24d5ab8ded29bc9be7e2 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 29 May 2017 20:25:28 -0400 Subject: [PATCH] Remove voice input key Change-Id: Ifb56c679d3a9b6c035fcdd4596ec0b3b5653bea8 --- java/res/values-sw430dp/config-per-form-factor.xml | 2 +- java/res/values/config-per-form-factor.xml | 2 +- java/res/xml/prefs_screen_preferences.xml | 2 +- .../inputmethod/latin/settings/PreferencesSettingsFragment.java | 3 +-- java/src/com/android/inputmethod/latin/settings/SettingsValues.java | 6 ++---- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/java/res/values-sw430dp/config-per-form-factor.xml b/java/res/values-sw430dp/config-per-form-factor.xml index 8868081c3..2199ab6b2 100644 --- a/java/res/values-sw430dp/config-per-form-factor.xml +++ b/java/res/values-sw430dp/config-per-form-factor.xml @@ -24,7 +24,7 @@ true false - true + false true diff --git a/java/res/values/config-per-form-factor.xml b/java/res/values/config-per-form-factor.xml index 67fc75134..1bbf1640e 100644 --- a/java/res/values/config-per-form-factor.xml +++ b/java/res/values/config-per-form-factor.xml @@ -24,7 +24,7 @@ true false - true + false true diff --git a/java/res/xml/prefs_screen_preferences.xml b/java/res/xml/prefs_screen_preferences.xml index 101edc855..540f9f6a6 100644 --- a/java/res/xml/prefs_screen_preferences.xml +++ b/java/res/xml/prefs_screen_preferences.xml @@ -48,6 +48,6 @@ diff --git a/java/src/com/android/inputmethod/latin/settings/PreferencesSettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/PreferencesSettingsFragment.java index d9858e61f..cd513a47e 100644 --- a/java/src/com/android/inputmethod/latin/settings/PreferencesSettingsFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/PreferencesSettingsFragment.java @@ -56,8 +56,7 @@ public final class PreferencesSettingsFragment extends SubScreenFragment { // initialization method of these classes here. See {@link LatinIME#onCreate()}. RichInputMethodManager.init(context); - final boolean showVoiceKeyOption = res.getBoolean( - R.bool.config_enable_show_voice_key_option); + final boolean showVoiceKeyOption = false; if (!showVoiceKeyOption) { removePreference(Settings.PREF_VOICE_INPUT_KEY); } diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java index 918978949..4c8618234 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java @@ -137,9 +137,7 @@ public class SettingsValues { mKeyPreviewPopupOn = Settings.readKeyPreviewPopupEnabled(prefs, res); mSlidingKeyInputPreviewEnabled = prefs.getBoolean( DebugSettings.PREF_SLIDING_KEY_INPUT_PREVIEW, true); - mShowsVoiceInputKey = needsToShowVoiceInputKey(prefs, res) - && mInputAttributes.mShouldShowVoiceInputKey - && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN; + mShowsVoiceInputKey = false; mIncludesOtherImesInLanguageSwitchList = Settings.ENABLE_SHOW_LANGUAGE_SWITCH_KEY_SETTINGS ? prefs.getBoolean(Settings.PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST, false) : true /* forcibly */; @@ -368,7 +366,7 @@ public class SettingsValues { .remove(Settings.PREF_VOICE_MODE_OBSOLETE) .apply(); } - return prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, true); + return prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, false); } public String dump() { -- 2.13.0