mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-12-25 15:38:48 +01:00
Fix recently introduced crash
This commit is contained in:
parent
dd5fce6cae
commit
092b8e1c15
@ -57,7 +57,7 @@ class Config
|
||||
horizontalMargin = res.getDimension(R.dimen.horizontal_margin);
|
||||
preciseRepeat = true;
|
||||
characterSize = 1.f;
|
||||
accents = 0;
|
||||
accents = 1;
|
||||
// from prefs
|
||||
refresh();
|
||||
// initialized later
|
||||
@ -83,7 +83,7 @@ class Config
|
||||
horizontalMargin = getDipPref(prefs, "horizontal_margin", horizontalMargin);
|
||||
preciseRepeat = prefs.getBoolean("precise_repeat", preciseRepeat);
|
||||
characterSize = prefs.getFloat("character_size", characterSize);
|
||||
accents = Integer.valueOf(prefs.getString("accents", ""));
|
||||
accents = Integer.valueOf(prefs.getString("accents", "1"));
|
||||
}
|
||||
|
||||
private float getDipPref(SharedPreferences prefs, String pref_name, float def)
|
||||
|
@ -12,10 +12,13 @@ public class Emoji extends KeyValue
|
||||
{
|
||||
private final String _desc;
|
||||
|
||||
private static HashMap<String, Emoji> emojis_by_name = new HashMap<String, Emoji>();
|
||||
|
||||
protected Emoji(String name, String bytecode, String desc)
|
||||
{
|
||||
super(name, bytecode, CHAR_NONE, EVENT_NONE, 0);
|
||||
_desc = desc;
|
||||
emojis_by_name.put(name, this);
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
@ -29,7 +32,7 @@ public class Emoji extends KeyValue
|
||||
|
||||
public static Emoji getEmojiByName(String name)
|
||||
{
|
||||
return ((Emoji)KeyValue.getKeyByName(name));
|
||||
return emojis_by_name.get(name);
|
||||
}
|
||||
|
||||
public static Emoji[] getEmojisByGroup(int group_id)
|
||||
|
Loading…
Reference in New Issue
Block a user