Include audio column as DISPLAY_NAME instaed of TITLE
To fix audio extension removed while GET_CONTENT by docsui, it
should let audio show as DISPLAY_NAME instead of TITLE because
TITLE does not include extension.
Fix: 120177449
Fix: 136063417
Test: manual
Change-Id: Ib8b8d3ed46a01eabb63a73d5c989f5c63b557a36
Merged-In: Ib8b8d3ed46a01eabb63a73d5c989f5c63b557a36
diff --git a/src/com/android/providers/media/MediaDocumentsProvider.java b/src/com/android/providers/media/MediaDocumentsProvider.java
index 54f5dab..6c593f2 100644
--- a/src/com/android/providers/media/MediaDocumentsProvider.java
+++ b/src/com/android/providers/media/MediaDocumentsProvider.java
@@ -1179,13 +1179,13 @@
private interface SongQuery {
final String[] PROJECTION = new String[] {
AudioColumns._ID,
- AudioColumns.TITLE,
+ AudioColumns.DISPLAY_NAME,
AudioColumns.MIME_TYPE,
AudioColumns.SIZE,
AudioColumns.DATE_MODIFIED };
final int _ID = 0;
- final int TITLE = 1;
+ final int DISPLAY_NAME = 1;
final int MIME_TYPE = 2;
final int SIZE = 3;
final int DATE_MODIFIED = 4;
@@ -1197,7 +1197,7 @@
final RowBuilder row = result.newRow();
row.add(Document.COLUMN_DOCUMENT_ID, docId);
- row.add(Document.COLUMN_DISPLAY_NAME, cursor.getString(SongQuery.TITLE));
+ row.add(Document.COLUMN_DISPLAY_NAME, cursor.getString(SongQuery.DISPLAY_NAME));
row.add(Document.COLUMN_SIZE, cursor.getLong(SongQuery.SIZE));
row.add(Document.COLUMN_MIME_TYPE, cursor.getString(SongQuery.MIME_TYPE));
row.add(Document.COLUMN_LAST_MODIFIED,