Support audio attachments through GalleryMediaChooser

GalleryMediaChooser supports audio types also. It displays simple audio
icon and file info for audio files on grid views.

Test: Manual

Change-Id: I98b605156af3c1909c0141a2b99380b5da11c1e2
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
Taesu Lee
2020-02-20 08:52:44 +09:00
parent 6c77158718
commit 2716c26c23
9 changed files with 188 additions and 71 deletions
@@ -39,7 +39,7 @@ import com.android.messaging.util.Assert;
import com.android.messaging.util.OsUtil;
/**
* Chooser which allows the user to select one or more existing images or videos
* Chooser which allows the user to select one or more existing images or videos or audios.
*/
class GalleryMediaChooser extends MediaChooser implements
GalleryGridView.GalleryGridViewListener, MediaPickerDataListener {
@@ -54,7 +54,9 @@ class GalleryMediaChooser extends MediaChooser implements
@Override
public int getSupportedMediaTypes() {
return MediaPicker.MEDIA_TYPE_IMAGE | MediaPicker.MEDIA_TYPE_VIDEO;
return (MediaPicker.MEDIA_TYPE_IMAGE
| MediaPicker.MEDIA_TYPE_VIDEO
| MediaPicker.MEDIA_TYPE_AUDIO);
}
@Override