From 4a5a125aea4f1edf826dd4897292ba4dc0f1d1b9 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 30 Dec 2023 01:24:21 +0100 Subject: Bring the voice IME chooser with a long press --- srcs/juloo.keyboard2/VoiceImeSwitcher.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'srcs/juloo.keyboard2/VoiceImeSwitcher.java') 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 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. */ -- cgit v1.2.3