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) { if (context != null) {
ContentResolver resolver = context.getContentResolver(); ContentResolver resolver = context.getContentResolver();
try { try {
// TODO: MediaStore.Video.Media.DURATION requires API level 29
String[] projection = { String[] projection = {
MediaStore.MediaColumns._ID, MediaStore.MediaColumns._ID,
MediaStore.MediaColumns.DATA, 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 nameColumn = cursor.getColumnIndex(MediaStore.MediaColumns.DISPLAY_NAME);
int typeColumn = cursor.getColumnIndex(MediaStore.MediaColumns.MIME_TYPE); int typeColumn = cursor.getColumnIndex(MediaStore.MediaColumns.MIME_TYPE);
int pathColumn = cursor.getColumnIndex(MediaStore.MediaColumns.DATA); int pathColumn = cursor.getColumnIndex(MediaStore.MediaColumns.DATA);
// TODO: MediaStore.Video.Media.DURATION requires API level 29
int durationColumn = cursor.getColumnIndex(MediaStore.Video.Media.DURATION); int durationColumn = cursor.getColumnIndex(MediaStore.Video.Media.DURATION);
GalleryItem item = new GalleryItem(); GalleryItem item = new GalleryItem();