diff --git a/Patches/LineageOS-20.0/android_packages_inputmethods_LatinIME/0001-Voice.patch b/Patches/LineageOS-20.0/android_packages_inputmethods_LatinIME/0001-Voice.patch new file mode 100644 index 00000000..32691ff3 --- /dev/null +++ b/Patches/LineageOS-20.0/android_packages_inputmethods_LatinIME/0001-Voice.patch @@ -0,0 +1,92 @@ +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 6eb8e98b8..8eec5b0f3 100644 +--- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java ++++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java +@@ -140,9 +140,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; + mShowNumberRow = prefs.getBoolean(Settings.PREF_SHOW_NUMBER_ROW, false); + mShowLongpressHints = prefs.getBoolean(Settings.PREF_SHOW_LONGPRESS_HINTS, true); + mIncludesOtherImesInLanguageSwitchList = Settings.ENABLE_SHOW_LANGUAGE_SWITCH_KEY_SETTINGS +@@ -374,7 +372,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 diff --git a/Patches/LineageOS-20.0/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch b/Patches/LineageOS-20.0/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch new file mode 100644 index 00000000..c86b2203 --- /dev/null +++ b/Patches/LineageOS-20.0/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch @@ -0,0 +1,35 @@ +From 8cfece6ef083e379eaa7b8d7b3f0db5cf9d1b110 Mon Sep 17 00:00:00 2001 +From: Daniel Micay +Date: Thu, 14 Sep 2017 00:03:16 -0400 +Subject: [PATCH] disable personalized dicts by default + +--- + java/res/xml/prefs_screen_correction.xml | 1 - + .../com/android/inputmethod/latin/settings/SettingsValues.java | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/java/res/xml/prefs_screen_correction.xml b/java/res/xml/prefs_screen_correction.xml +index a943dc1a3..6f6b3666c 100644 +--- a/java/res/xml/prefs_screen_correction.xml ++++ b/java/res/xml/prefs_screen_correction.xml +@@ -57,7 +57,6 @@ + android:key="pref_key_use_personalized_dicts" + android:title="@string/use_personalized_dicts" + android:summary="@string/use_personalized_dicts_summary" +- android:defaultValue="true" + android:persistent="true" /> +