Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/src/main/java/helium314/keyboard/latin/LatinIME.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2640,6 +2640,8 @@ class LatinIME : InputMethodService(),
override fun onReceive(context: Context, intent: Intent) {
val action = intent.action ?: return
if (action != ACTION_SWITCH_SUBTYPE && action != ACTION_SWITCH_LAYOUT && action != ACTION_SWITCH_MODE) return
// any app may send these, so only when switched on (e.g. for Tasker)
if (!prefs().getBoolean(Settings.PREF_AUTOMATION_BROADCASTS, Defaults.PREF_AUTOMATION_BROADCASTS)) return

val editorInfo = currentInputEditorInfo
if (isDeviceLocked(this@LatinIME) || InputTypeUtils.isAnyPasswordInputType(editorInfo?.inputType ?: 0)) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ object Defaults {
const val PREF_TOUCHPAD_FULLSCREEN = false
const val PREF_FORCE_AUTO_CAPS = false
const val PREF_SHIFT_RECAPITALIZES_WORD = false
const val PREF_AUTOMATION_BROADCASTS = false
const val PREF_CLIPBOARD_SKIP_SENSITIVE = false
const val PREF_OFFLINE_TEMP = 0.1f // Lower for faster, more deterministic proofreading
const val PREF_OFFLINE_TOP_P = 0.5f // Lower for faster token sampling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ class Settings private constructor() : SharedPreferences.OnSharedPreferenceChang
const val PREF_PERSIST_TEXT_EDIT_MODE = "persist_text_edit_mode"
const val PREF_FORCE_AUTO_CAPS = "force_auto_caps"
const val PREF_SHIFT_RECAPITALIZES_WORD = "shift_recapitalizes_word"
const val PREF_AUTOMATION_BROADCASTS = "automation_broadcasts"
const val PREF_CLIPBOARD_SKIP_SENSITIVE = "clipboard_skip_sensitive"
const val PREF_SETUP_WIZARD_DISMISSED = "setup_wizard_dismissed"
const val PREF_OFFLINE_TEMP = "offline_temp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ fun AdvancedSettingsScreen(
listOfNotNull(
// Primary
Settings.PREF_ALWAYS_INCOGNITO_MODE,
Settings.PREF_AUTOMATION_BROADCASTS,
Settings.PREF_DISABLE_NETWORK,
SettingsWithoutKey.APP_QUIRKS,
SettingsWithoutKey.BACKGROUND_SERVICES,
Expand Down Expand Up @@ -148,6 +149,9 @@ private fun createAdvancedSettings(context: Context) = listOfNotNull(
{
SwitchPreference(it, Defaults.PREF_ALWAYS_INCOGNITO_MODE) { KeyboardSwitcher.getInstance().setThemeNeedsReload() }
},
Setting(context, Settings.PREF_AUTOMATION_BROADCASTS, R.string.automation_broadcasts, R.string.automation_broadcasts_summary) {
SwitchPreference(it, Defaults.PREF_AUTOMATION_BROADCASTS)
},
Setting(context, Settings.PREF_PHYSICAL_KEYBOARD_LAYOUT, R.string.prefs_physical_keyboard_layout,
R.string.prefs_physical_keyboard_layout_summary) { setting ->
val items = listOf(
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ Ermöglicht lokale GGUF / llama.cpp-Inferenz für Korrekturlesen und Umschreiben
<string name="ocr_camera_failed">Kamera konnte nicht gestartet werden. Zum erneuten Versuch tippen.</string>
<string name="handwriting_not_recognized">Die Handschrift konnte nicht erkannt werden. Versuchen Sie es erneut.</string>
<string-array name="settings_search_keywords">
<item>automation_broadcasts|tasker macrodroid automatisierung intent broadcast adb</item>
<item>theme_colors|design thema dunkel hell aussehen look</item>
<item>theme_colors_night|design thema dunkel aussehen</item>
<item>theme_style|design aussehen form rund</item>
Expand Down Expand Up @@ -1802,4 +1803,6 @@ Ermöglicht lokale GGUF / llama.cpp-Inferenz für Korrekturlesen und Umschreiben
<string name="prefs_physical_key_long_press_popup">Lange auf physische Tasten drücken, um Popup-Zeichen anzuzeigen</string>
<string name="prefs_physical_key_long_press_popup_summary">Beim Halten einer physischen Taste werden die Zeichen ihres Popups in der Vorschlagsleiste angezeigt. Wählen Sie eines aus, um den getippten Buchstaben zu ersetzen</string>
<string name="clipboard_history_retention">Verlaufsspeicherung</string>
<string name="automation_broadcasts">Umschalten durch andere Apps erlauben</string>
<string name="automation_broadcasts_summary">Automatisierungs-Apps (Tasker, MacroDroid, ADB) dürfen Sprache, Layout oder Ansicht umschalten, z. B. auf die Zwischenablage. Eingeschaltet kann das jede installierte App</string>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2491,6 +2491,7 @@ New dictionary:
<string name="settings_search_show_in_screen">Show in its screen</string>
<!-- Additional search words for settings: "setting key|word word ...". Only words the search doesn't find in title and description (also not as part of a word) -->
<string-array name="settings_search_keywords">
<item>automation_broadcasts|tasker macrodroid automation intent broadcast adb</item>
<item>theme_colors|theme design colour dark light look skin</item>
<item>theme_colors_night|theme design colour dark look skin</item>
<item>theme_style|design look shape rounded</item>
Expand Down Expand Up @@ -2523,4 +2524,6 @@ New dictionary:
<item>background_image|picture photo wallpaper</item>
<item>navbar_color|buttons</item>
</string-array>
<string name="automation_broadcasts">Allow switching by other apps</string>
<string name="automation_broadcasts_summary">Automation apps (Tasker, MacroDroid, ADB) may switch the language, layout or mode, e.g. to the clipboard. Any installed app can do this when switched on</string>
</resources>
Loading