diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-09-13 13:22:19 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-09-13 16:02:27 -0700 |
commit | 86bfd7303d107f197c6e2c86cf96efb83156043b (patch) | |
tree | 61295e33b39545a6f0c7cc4018c89e373c6902d0 | |
parent | 0f90e312f1eeb52b3c9cd668f5593fd72217f9db (diff) | |
download | MediaProvider-86bfd7303d107f197c6e2c86cf96efb83156043b.tar.gz |
Hide titles when showing thumbnail-only dirs.
Bug: 10710331
Change-Id: I97e92e5216537d08c7c022b55c5e8fea12dd1d49
-rw-r--r-- | src/com/android/providers/media/MediaDocumentsProvider.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/com/android/providers/media/MediaDocumentsProvider.java b/src/com/android/providers/media/MediaDocumentsProvider.java index 8a97d8697..fc80066a2 100644 --- a/src/com/android/providers/media/MediaDocumentsProvider.java +++ b/src/com/android/providers/media/MediaDocumentsProvider.java @@ -475,7 +475,8 @@ public class MediaDocumentsProvider extends DocumentsProvider { final RowBuilder row = result.newRow(); row.add(Document.COLUMN_DOCUMENT_ID, TYPE_IMAGES_ROOT); row.add(Document.COLUMN_DISPLAY_NAME, getContext().getString(R.string.root_images)); - row.add(Document.COLUMN_FLAGS, Document.FLAG_DIR_PREFERS_GRID); + row.add(Document.COLUMN_FLAGS, + Document.FLAG_DIR_PREFERS_GRID | Document.FLAG_DIR_PREFERS_LAST_MODIFIED); row.add(Document.COLUMN_MIME_TYPE, Document.MIME_TYPE_DIR); } @@ -483,7 +484,8 @@ public class MediaDocumentsProvider extends DocumentsProvider { final RowBuilder row = result.newRow(); row.add(Document.COLUMN_DOCUMENT_ID, TYPE_VIDEOS_ROOT); row.add(Document.COLUMN_DISPLAY_NAME, getContext().getString(R.string.root_videos)); - row.add(Document.COLUMN_FLAGS, Document.FLAG_DIR_PREFERS_GRID); + row.add(Document.COLUMN_FLAGS, + Document.FLAG_DIR_PREFERS_GRID | Document.FLAG_DIR_PREFERS_LAST_MODIFIED); row.add(Document.COLUMN_MIME_TYPE, Document.MIME_TYPE_DIR); } @@ -516,8 +518,9 @@ public class MediaDocumentsProvider extends DocumentsProvider { row.add(Document.COLUMN_MIME_TYPE, Document.MIME_TYPE_DIR); row.add(Document.COLUMN_LAST_MODIFIED, cursor.getLong(ImagesBucketQuery.DATE_MODIFIED) * DateUtils.SECOND_IN_MILLIS); - row.add(Document.COLUMN_FLAGS, - Document.FLAG_DIR_PREFERS_GRID | Document.FLAG_SUPPORTS_THUMBNAIL); + row.add(Document.COLUMN_FLAGS, Document.FLAG_DIR_PREFERS_GRID + | Document.FLAG_SUPPORTS_THUMBNAIL | Document.FLAG_DIR_PREFERS_LAST_MODIFIED + | Document.FLAG_DIR_HIDE_GRID_TITLES); } private interface ImageQuery { @@ -571,8 +574,9 @@ public class MediaDocumentsProvider extends DocumentsProvider { row.add(Document.COLUMN_MIME_TYPE, Document.MIME_TYPE_DIR); row.add(Document.COLUMN_LAST_MODIFIED, cursor.getLong(VideosBucketQuery.DATE_MODIFIED) * DateUtils.SECOND_IN_MILLIS); - row.add(Document.COLUMN_FLAGS, - Document.FLAG_DIR_PREFERS_GRID | Document.FLAG_SUPPORTS_THUMBNAIL); + row.add(Document.COLUMN_FLAGS, Document.FLAG_DIR_PREFERS_GRID + | Document.FLAG_SUPPORTS_THUMBNAIL | Document.FLAG_DIR_PREFERS_LAST_MODIFIED + | Document.FLAG_DIR_HIDE_GRID_TITLES); } private interface VideoQuery { |