List of usage examples for android.graphics Paint hasGlyph
public boolean hasGlyph(String string)
From source file:com.waz.zclient.MainActivity.java
private void checkForUnsupportedEmojis() { if (getControllerFactory() == null || getControllerFactory().isTornDown()) { return;// w w w . j av a 2 s . co m } IUserPreferencesController userPreferencesController = getControllerFactory() .getUserPreferencesController(); Collection<String> unsupported = new ArrayList<>(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { Paint paint = new Paint(); for (String[] array : Emojis.getAllEmojisSortedByCategory()) { for (String emoji : array) { if (!paint.hasGlyph(emoji)) { unsupported.add(emoji); } } } } else { for (String[] array : Emojis.getAllEmojisSortedByCategory()) { unsupported.addAll(Arrays.asList(array)); } unsupported = StringUtils.getMissingInFont(unsupported); } if (!unsupported.isEmpty()) { userPreferencesController.setUnsupportedEmoji(unsupported, Emojis.VERSION); } }