Loading .gitlab-ci.yml 0 → 100644 +7 −0 Original line number Diff line number Diff line stages: - update-from-upstream include: - project: 'e/templates' ref: master file: '/gitlab-ci/.gitlab-ci-import-updates-from-upstream.yml' java/res/xml/prefs_screen_preferences.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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> java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java +12 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver { } else if (Intent.ACTION_BOOT_COMPLETED.equals(intentAction)) { Log.i(TAG, "Boot has been completed"); toggleAppIcon(context); disableVoiceKey(context); } else if (Intent.ACTION_LOCALE_CHANGED.equals(intentAction)) { Log.i(TAG, "System locale changed"); KeyboardLayoutSet.onSystemLocaleChanged(); Loading Loading @@ -156,4 +157,15 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver { : PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); } public static void disableVoiceKey(final Context context) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); if (prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, false) && !prefs.getBoolean(Settings.PREF_FORCED_DISABLE_VOICE_INPUT_KEY, false)) { prefs.edit() .putBoolean(Settings.PREF_VOICE_INPUT_KEY, false) .putBoolean(Settings.PREF_FORCED_DISABLE_VOICE_INPUT_KEY, true) .apply(); } } } java/src/com/android/inputmethod/latin/settings/Settings.java +2 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang // PREF_VOICE_MODE_OBSOLETE is obsolete. Use PREF_VOICE_INPUT_KEY instead. public static final String PREF_VOICE_MODE_OBSOLETE = "voice_mode"; public static final String PREF_VOICE_INPUT_KEY = "pref_voice_input_key"; // Added by /e/ to disable old enabled voice key public static final String PREF_FORCED_DISABLE_VOICE_INPUT_KEY = "pref_forced_disable_voice_input_key"; public static final String PREF_EDIT_PERSONAL_DICTIONARY = "edit_personal_dictionary"; public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key"; // PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE is obsolete. Use PREF_AUTO_CORRECTION instead. Loading java/src/com/android/inputmethod/latin/settings/SettingsValues.java +1 −1 Original line number Diff line number Diff line Loading @@ -366,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() { Loading Loading
.gitlab-ci.yml 0 → 100644 +7 −0 Original line number Diff line number Diff line stages: - update-from-upstream include: - project: 'e/templates' ref: master file: '/gitlab-ci/.gitlab-ci-import-updates-from-upstream.yml'
java/res/xml/prefs_screen_preferences.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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>
java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java +12 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver { } else if (Intent.ACTION_BOOT_COMPLETED.equals(intentAction)) { Log.i(TAG, "Boot has been completed"); toggleAppIcon(context); disableVoiceKey(context); } else if (Intent.ACTION_LOCALE_CHANGED.equals(intentAction)) { Log.i(TAG, "System locale changed"); KeyboardLayoutSet.onSystemLocaleChanged(); Loading Loading @@ -156,4 +157,15 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver { : PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); } public static void disableVoiceKey(final Context context) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); if (prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, false) && !prefs.getBoolean(Settings.PREF_FORCED_DISABLE_VOICE_INPUT_KEY, false)) { prefs.edit() .putBoolean(Settings.PREF_VOICE_INPUT_KEY, false) .putBoolean(Settings.PREF_FORCED_DISABLE_VOICE_INPUT_KEY, true) .apply(); } } }
java/src/com/android/inputmethod/latin/settings/Settings.java +2 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang // PREF_VOICE_MODE_OBSOLETE is obsolete. Use PREF_VOICE_INPUT_KEY instead. public static final String PREF_VOICE_MODE_OBSOLETE = "voice_mode"; public static final String PREF_VOICE_INPUT_KEY = "pref_voice_input_key"; // Added by /e/ to disable old enabled voice key public static final String PREF_FORCED_DISABLE_VOICE_INPUT_KEY = "pref_forced_disable_voice_input_key"; public static final String PREF_EDIT_PERSONAL_DICTIONARY = "edit_personal_dictionary"; public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key"; // PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE is obsolete. Use PREF_AUTO_CORRECTION instead. Loading
java/src/com/android/inputmethod/latin/settings/SettingsValues.java +1 −1 Original line number Diff line number Diff line Loading @@ -366,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() { Loading