From e583c037516403169931287cc08b732933883c16 Mon Sep 17 00:00:00 2001 From: onurays Date: Tue, 24 Mar 2020 12:32:37 +0300 Subject: [PATCH] Add documentation. --- .../main/java/im/vector/riotx/multipicker/AudioPicker.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/multipicker/src/main/java/im/vector/riotx/multipicker/AudioPicker.kt b/multipicker/src/main/java/im/vector/riotx/multipicker/AudioPicker.kt index a9c89a9ec0..05e4c337b6 100644 --- a/multipicker/src/main/java/im/vector/riotx/multipicker/AudioPicker.kt +++ b/multipicker/src/main/java/im/vector/riotx/multipicker/AudioPicker.kt @@ -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(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 { if (requestCode != this.requestCode && resultCode != Activity.RESULT_OK) { return emptyList()