Commit ef5dac97 authored by Marius Volkhart's avatar Marius Volkhart

Only allow Openable content in Storage Access Framework

Add the CATEGORY_OPENABLE to the Intent to launch the Storage Access Framework (SAF) when sending a file. Setting this category ensures that the OpenableColumns data contract is met by the opened data, which we rely upon during data upload.

In practice, some content, such as Contacts, will no longer display in the SAF UI.

Fixes #935
parent fab10670
......@@ -467,6 +467,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
val intent = Intent(Intent.ACTION_GET_CONTENT)
intent.type = "*/*"
intent.putExtra(Intent.EXTRA_MIME_TYPES, filter)
intent.addCategory(Intent.CATEGORY_OPENABLE)
startActivityForResult(intent, REQUEST_CODE_FOR_PERFORM_SAF)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment