From 3782a6fac6486a4d9363a1f6781d2ab29f9a0c2f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 5 Jul 2018 13:22:32 +0200 Subject: [PATCH] EmojiService: use replaceAll=false on android 8 --- .../eu/siacs/conversations/ui/service/EmojiService.java | 6 +++++- .../eu/siacs/conversations/ui/service/EmojiService.java | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freeCompat/java/eu/siacs/conversations/ui/service/EmojiService.java b/src/freeCompat/java/eu/siacs/conversations/ui/service/EmojiService.java index 094e3da92..53cea0dfd 100644 --- a/src/freeCompat/java/eu/siacs/conversations/ui/service/EmojiService.java +++ b/src/freeCompat/java/eu/siacs/conversations/ui/service/EmojiService.java @@ -21,7 +21,11 @@ public class EmojiService { public void init() { BundledEmojiCompatConfig config = new BundledEmojiCompatConfig(context); - config.setReplaceAll(true); + //On recent Androids we assume to have the latest emojis + //there are some annoying bugs with emoji compat that make it a safer choice not to use it when possible + // a) the text preview has annoying glitches when the cut of text contains emojis (the emoji will be half visible) + // b) can trigger a hardware rendering bug https://issuetracker.google.com/issues/67102093 + config.setReplaceAll(Build.VERSION.SDK_INT < Build.VERSION_CODES.O); EmojiCompat.init(config); } diff --git a/src/playstoreCompat/java/eu/siacs/conversations/ui/service/EmojiService.java b/src/playstoreCompat/java/eu/siacs/conversations/ui/service/EmojiService.java index 52d61ff13..106d08204 100644 --- a/src/playstoreCompat/java/eu/siacs/conversations/ui/service/EmojiService.java +++ b/src/playstoreCompat/java/eu/siacs/conversations/ui/service/EmojiService.java @@ -46,6 +46,7 @@ public class EmojiService { //there are some annoying bugs with emoji compat that make it a safer choice not to use it when possible // a) when using the ondemand emoji font (play store) flags don’t work // b) the text preview has annoying glitches when the cut of text contains emojis (the emoji will be half visible) + // c) can trigger a hardware rendering bug https://issuetracker.google.com/issues/67102093 fontRequestEmojiCompatConfig.setReplaceAll(Build.VERSION.SDK_INT < Build.VERSION_CODES.O); EmojiCompat.init(fontRequestEmojiCompatConfig); }