PR cleanup #1164

Merged
akinwale merged 32 commits from pr-1118 into master 2021-03-08 20:15:23 +01:00
Showing only changes of commit 1ca2b92855 - Show all commits

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();