mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-06 00:02:48 +02:00
Fix crash on Android 12.
I guess we accept only images coming from the keyboard.
This commit is contained in:
committed by
Benoit Marty
parent
b26ea752b5
commit
60d75ff8e2
@@ -46,7 +46,7 @@ class ComposerEditText @JvmOverloads constructor(context: Context, attrs: Attrib
|
||||
|
||||
override fun onCreateInputConnection(editorInfo: EditorInfo): InputConnection? {
|
||||
var ic = super.onCreateInputConnection(editorInfo) ?: return null
|
||||
val mimeTypes = ViewCompat.getOnReceiveContentMimeTypes(this) ?: arrayOf("*/*")
|
||||
val mimeTypes = ViewCompat.getOnReceiveContentMimeTypes(this) ?: arrayOf("image/*")
|
||||
|
||||
EditorInfoCompat.setContentMimeTypes(editorInfo, mimeTypes)
|
||||
ic = InputConnectionCompat.createWrapper(this, ic, editorInfo)
|
||||
|
Reference in New Issue
Block a user