PR cleanup #1164
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue