mirror of
https://github.com/element-hq/element-android
synced 2024-12-17 23:02:48 +03:00
Add documentation.
This commit is contained in:
parent
d20b1cb64a
commit
e583c03751
1 changed files with 9 additions and 0 deletions
|
@ -23,8 +23,17 @@ import android.media.MediaMetadataRetriever
|
|||
import android.provider.MediaStore
|
||||
import im.vector.riotx.multipicker.entity.MultiPickerAudioType
|
||||
|
||||
/**
|
||||
* Audio file picker implementation
|
||||
*/
|
||||
class AudioPicker(override val requestCode: Int) : Picker<MultiPickerAudioType>(requestCode) {
|
||||
|
||||
/**
|
||||
* Call this function from onActivityResult(int, int, Intent).
|
||||
* Returns selected audio files or empty list if request code is wrong
|
||||
* or result code is not Activity.RESULT_OK
|
||||
* or user did not select any files.
|
||||
*/
|
||||
override fun getSelectedFiles(context: Context, requestCode: Int, resultCode: Int, data: Intent?): List<MultiPickerAudioType> {
|
||||
if (requestCode != this.requestCode && resultCode != Activity.RESULT_OK) {
|
||||
return emptyList()
|
||||
|
|
Loading…
Reference in a new issue