Add todo for MediaStore.Video.Media.DURATION that requires API level 29

This commit is contained in:
Patric Karlström 2021-01-13 15:19:56 +01:00
parent 62dbfed1a3
commit 1ca2b92855

View file

@ -44,6 +44,7 @@ public class LoadGalleryItemsTask extends AsyncTask<Void, GalleryItem, List<Gall
if (context != null) {
ContentResolver resolver = context.getContentResolver();
try {
// TODO: MediaStore.Video.Media.DURATION requires API level 29
String[] projection = {
MediaStore.MediaColumns._ID,
MediaStore.MediaColumns.DATA,
@ -61,6 +62,7 @@ public class LoadGalleryItemsTask extends AsyncTask<Void, GalleryItem, List<Gall
int nameColumn = cursor.getColumnIndex(MediaStore.MediaColumns.DISPLAY_NAME);
int typeColumn = cursor.getColumnIndex(MediaStore.MediaColumns.MIME_TYPE);
int pathColumn = cursor.getColumnIndex(MediaStore.MediaColumns.DATA);
// TODO: MediaStore.Video.Media.DURATION requires API level 29
int durationColumn = cursor.getColumnIndex(MediaStore.Video.Media.DURATION);
GalleryItem item = new GalleryItem();