mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-06-19 17:31:30 +02:00
Fix NullPointerException when ready options from subtypes
Seems like subtypes might not match what is declared. Must protect against that.
This commit is contained in:
parent
68945ff227
commit
1a18ea56ca
@ -80,10 +80,14 @@ public class Keyboard2 extends InputMethodService
|
|||||||
|
|
||||||
private void refreshSubtypeLayout(InputMethodSubtype subtype)
|
private void refreshSubtypeLayout(InputMethodSubtype subtype)
|
||||||
{
|
{
|
||||||
if (_config.layout == -1)
|
int l = _config.layout;;
|
||||||
_currentTextLayout = Config.layoutId_of_string(subtype.getExtraValueOf("default_layout"));
|
if (l == -1)
|
||||||
else
|
{
|
||||||
_currentTextLayout = _config.layout;
|
String s = subtype.getExtraValueOf("default_layout");
|
||||||
|
if (s != null)
|
||||||
|
l = Config.layoutId_of_string(s);
|
||||||
|
}
|
||||||
|
_currentTextLayout = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int accents_of_subtype(InputMethodSubtype subtype)
|
private int accents_of_subtype(InputMethodSubtype subtype)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user