EmojiService: use replaceAll=false on android 8

Daniel Gultsch created

Change summary

src/freeCompat/java/eu/siacs/conversations/ui/service/EmojiService.java      | 6 
src/playstoreCompat/java/eu/siacs/conversations/ui/service/EmojiService.java | 1 
2 files changed, 6 insertions(+), 1 deletion(-)

Detailed changes

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);
     }
 

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);
     }