mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-08-18 01:10:00 +02:00
Fix crash on devices with only unsupported languages
This only affected Android 12 and up.
This commit is contained in:
@@ -157,6 +157,8 @@ public class Keyboard2 extends InputMethodService
|
||||
// Android might return a random subtype, for example, the first in the
|
||||
// list alphabetically.
|
||||
InputMethodSubtype current_subtype = imm.getCurrentInputMethodSubtype();
|
||||
if (current_subtype == null)
|
||||
return null;
|
||||
for (InputMethodSubtype s : enabled_subtypes)
|
||||
if (s.getLanguageTag().equals(current_subtype.getLanguageTag()))
|
||||
return s;
|
||||
|
Reference in New Issue
Block a user