diff options
| author | Jules Aguillon | 2023-12-30 01:24:21 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2023-12-30 01:24:21 +0100 |
| commit | 4a5a125aea4f1edf826dd4897292ba4dc0f1d1b9 (patch) | |
| tree | 056f490624fd08b250407dd473702554675cb478 /srcs/juloo.keyboard2/VoiceImeSwitcher.java | |
| parent | 51a41ec90af505b153cc7a016de3c1e8a18dc427 (diff) | |
| download | unexpected-keyboard-4a5a125aea4f1edf826dd4897292ba4dc0f1d1b9.tar.gz unexpected-keyboard-4a5a125aea4f1edf826dd4897292ba4dc0f1d1b9.zip | |
Bring the voice IME chooser with a long press
Diffstat (limited to 'srcs/juloo.keyboard2/VoiceImeSwitcher.java')
| -rw-r--r-- | srcs/juloo.keyboard2/VoiceImeSwitcher.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/VoiceImeSwitcher.java b/srcs/juloo.keyboard2/VoiceImeSwitcher.java index 7ddda5e..fd6d691 100644 --- a/srcs/juloo.keyboard2/VoiceImeSwitcher.java +++ b/srcs/juloo.keyboard2/VoiceImeSwitcher.java @@ -43,6 +43,16 @@ class VoiceImeSwitcher return true; } + public static boolean choose_voice_ime(InputMethodService ims, + InputMethodManager imm, SharedPreferences prefs) + { + if (VERSION.SDK_INT < 11) // Due to InputMethodSubtype + return false; + List<IME> imes = get_voice_ime_list(imm); + choose_voice_ime_and_update_prefs(ims, prefs, imes); + return true; + } + /** Show the voice IME chooser popup and switch to the selected IME. Preferences are updated so that future calls to [switch_to_voice_ime] switch to the newly selected IME. */ |
