Workaround a crash
app/src/main/java/eu/lepiller/nani/MainActivity.java
231 | 231 | ||
232 | 232 | List<String> kanji = new ArrayList<>(); | |
233 | 233 | for(String c: text.split("")) { | |
234 | - | if(Character.UnicodeBlock.of(c.codePointAt(0)) == CJK_UNIFIED_IDEOGRAPHS) { | |
234 | + | if(c.isEmpty()) { | |
235 | + | Log.w(TAG, "Splitting text " + text + "gave an empty component"); | |
236 | + | } else if (Character.UnicodeBlock.of(c.codePointAt(0)) == CJK_UNIFIED_IDEOGRAPHS) { | |
235 | 237 | kanji.add(c); | |
236 | 238 | } | |
237 | 239 | } |