also allow image/webp as sticker format

This commit is contained in:
B. Petersen 2021-06-07 21:51:23 +02:00 committed by bjoern
parent d7729b6001
commit 073c915d24

View file

@ -126,7 +126,11 @@ public class ComposeText extends EmojiEditText {
if (mediaListener == null) return inputConnection; if (mediaListener == null) return inputConnection;
if (inputConnection == null) return null; if (inputConnection == null) return null;
EditorInfoCompat.setContentMimeTypes(editorInfo, new String[] {"image/jpeg", "image/png", "image/gif"}); // media with mime-types defined by setContentMimeTypes() may be selected in the system keyboard
// and are passed to onCommitContent() then;
// from there we use them as stickers.
EditorInfoCompat.setContentMimeTypes(editorInfo, new String[] {"image/jpeg", "image/png", "image/gif", "image/webp"});
return InputConnectionCompat.createWrapper(inputConnection, editorInfo, new CommitContentListener(mediaListener)); return InputConnectionCompat.createWrapper(inputConnection, editorInfo, new CommitContentListener(mediaListener));
} }