Skip to content

Commit

Permalink
add last modified date to media data row
Browse files Browse the repository at this point in the history
  • Loading branch information
wmartinmimi committed Nov 28, 2023
1 parent 68a7ccd commit 7514475
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,16 @@ public Cursor query(Uri uri, String[] projection, String selection, String[] sel
var columns = new String[] {
MediaStore.MediaColumns.DISPLAY_NAME,
MediaStore.MediaColumns.SIZE,
MediaStore.MediaColumns.DATA
MediaStore.MediaColumns.DATA,
MediaStore.MediaColumns.DATE_MODIFIED,
};
var row = new String[] {
file.getName(),
String.valueOf(file.length()),
file.getAbsolutePath()
file.getAbsolutePath(),
String.valueOf(file.lastModified()),
};

final MatrixCursor cursor = new MatrixCursor(columns, 1);
cursor.addRow(row);
return cursor;
Expand Down

0 comments on commit 7514475

Please sign in to comment.