mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-03-08 06:06:11 -05:00
20.0: LatinIME patches rebased by @danielk43
closes https://github.com/Divested-Mobile/DivestOS-Build/issues/244 Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
5eb6190931
commit
cbc5a339e6
@ -0,0 +1,92 @@
|
||||
From 0b916be981f926661c9e24d5ab8ded29bc9be7e2 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
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 @@
|
||||
<!-- Whether or not Popup on key press is enabled by default -->
|
||||
<bool name="config_default_key_preview_popup">true</bool>
|
||||
<bool name="config_default_sound_enabled">false</bool>
|
||||
- <bool name="config_enable_show_voice_key_option">true</bool>
|
||||
+ <bool name="config_enable_show_voice_key_option">false</bool>
|
||||
<bool name="config_key_selection_by_dragging_finger">true</bool>
|
||||
<!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
|
||||
false -->
|
||||
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 @@
|
||||
<!-- Whether or not Popup on key press is enabled by default -->
|
||||
<bool name="config_default_key_preview_popup">true</bool>
|
||||
<bool name="config_default_sound_enabled">false</bool>
|
||||
- <bool name="config_enable_show_voice_key_option">true</bool>
|
||||
+ <bool name="config_enable_show_voice_key_option">false</bool>
|
||||
<bool name="config_key_selection_by_dragging_finger">true</bool>
|
||||
<!-- Showing more keys keyboard, just above the touched point if true, aligned to the key if
|
||||
false -->
|
||||
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 @@
|
||||
<CheckBoxPreference
|
||||
android:key="pref_voice_input_key"
|
||||
android:title="@string/voice_input"
|
||||
- android:defaultValue="true"
|
||||
+ android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
</PreferenceScreen>
|
||||
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
|
@ -0,0 +1,35 @@
|
||||
From 8cfece6ef083e379eaa7b8d7b3f0db5cf9d1b110 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
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" />
|
||||
<CheckBoxPreference
|
||||
android:key="pref_key_use_contacts_dict"
|
||||
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
|
||||
index 8eec5b0f3..76fcbdb3a 100644
|
||||
--- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
|
||||
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
|
||||
@@ -150,7 +150,7 @@ public class SettingsValues {
|
||||
? Settings.readShowsLanguageSwitchKey(prefs) : true /* forcibly */;
|
||||
mShowsEmojiKey = prefs.getBoolean(Settings.PREF_SHOW_EMOJI_KEY, false);
|
||||
mUseContactsDict = prefs.getBoolean(Settings.PREF_KEY_USE_CONTACTS_DICT, true);
|
||||
- mUsePersonalizedDicts = prefs.getBoolean(Settings.PREF_KEY_USE_PERSONALIZED_DICTS, true);
|
||||
+ mUsePersonalizedDicts = prefs.getBoolean(Settings.PREF_KEY_USE_PERSONALIZED_DICTS, false);
|
||||
mUseDoubleSpacePeriod = prefs.getBoolean(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true)
|
||||
&& inputAttributes.mIsGeneralTextInput;
|
||||
mBlockPotentiallyOffensive = Settings.readBlockPotentiallyOffensive(prefs, res);
|
@ -1 +1 @@
|
||||
Subproject commit 5574f6e25e60e0a24cffff22bac7e9f74744c29f
|
||||
Subproject commit 53ac146c4e5c927f3f5517f6a0c837722e7fe365
|
@ -350,8 +350,8 @@ sed -i 's/PROP_BUILD_VERSION_INCREMENTAL);/PROP_BUILD_VERSION_INCREMENTAL).repla
|
||||
fi;
|
||||
|
||||
if enterAndClear "packages/inputmethods/LatinIME"; then
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key (DivestOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch"; #Disable personalization dictionary by default (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key (DivestOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch"; #Disable personalization dictionary by default (GrapheneOS)
|
||||
fi;
|
||||
|
||||
if enterAndClear "packages/modules/Bluetooth"; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user