From 7b75fe5257c34cf744db2c6c377d8b68531ba085 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Fri, 18 Oct 2019 18:55:36 -0600 Subject: [PATCH] Reconcile MediaStore with MediaMetadataRetriever. Over the last year we've been converging on saying that MediaProvider is an indexed view of values that developers can obtain directly from MediaMetadataRetriever. This change starts indexing several fields of interest to bring these two surfaces into sync. Since we're going to be asking MediaMetadataRetriever about audio, video, and image files, it could return any metadata values for any of those file types, so we're adding and promoting fields up to the MediaColumns level. Bring back APIs related to "trashing" media items; they had been in place for the last release, but were hidden until we had firm requests to add them, and partners have now requested them. Also add APIs for marking media items as "favorite", as requested by partners. Bug: 135343128, 142478744, 122025511, 142498573 Test: atest --test-mapping packages/providers/MediaProvider Change-Id: Ie839ec1b2eed621786d0d10f35a061cbc52f192b --- api/current.txt | 31 +- api/removed.txt | 18 +- core/java/android/provider/MediaStore.java | 353 ++++++++++++++------- 3 files changed, 264 insertions(+), 138 deletions(-) diff --git a/api/current.txt b/api/current.txt index 57bbd77656788..1d51e2725f60b 100644 --- a/api/current.txt +++ b/api/current.txt @@ -38490,7 +38490,11 @@ package android.provider { method @NonNull public static String getVersion(@NonNull android.content.Context, @NonNull String); method @NonNull public static String getVolumeName(@NonNull android.net.Uri); method @NonNull public static android.net.Uri setIncludePending(@NonNull android.net.Uri); + method @NonNull public static android.net.Uri setIncludeTrashed(@NonNull android.net.Uri); method @NonNull public static android.net.Uri setRequireOriginal(@NonNull android.net.Uri); + method public static void trash(@NonNull android.content.Context, @NonNull android.net.Uri); + method public static void trash(@NonNull android.content.Context, @NonNull android.net.Uri, long); + method public static void untrash(@NonNull android.content.Context, @NonNull android.net.Uri); field public static final String ACTION_IMAGE_CAPTURE = "android.media.action.IMAGE_CAPTURE"; field public static final String ACTION_IMAGE_CAPTURE_SECURE = "android.media.action.IMAGE_CAPTURE_SECURE"; field public static final String ACTION_REVIEW = "android.provider.action.REVIEW"; @@ -38583,14 +38587,11 @@ package android.provider { } public static interface MediaStore.Audio.AudioColumns extends android.provider.MediaStore.MediaColumns { - field public static final String ALBUM = "album"; field public static final String ALBUM_ID = "album_id"; field @Deprecated public static final String ALBUM_KEY = "album_key"; - field public static final String ARTIST = "artist"; field public static final String ARTIST_ID = "artist_id"; field @Deprecated public static final String ARTIST_KEY = "artist_key"; field public static final String BOOKMARK = "bookmark"; - field public static final String COMPOSER = "composer"; field public static final String GENRE = "genre"; field public static final String GENRE_ID = "genre_id"; field @Deprecated public static final String GENRE_KEY = "genre_key"; @@ -38705,7 +38706,6 @@ package android.provider { field public static final int MEDIA_TYPE_VIDEO = 3; // 0x3 field public static final String MIME_TYPE = "mime_type"; field public static final String PARENT = "parent"; - field public static final String TITLE = "title"; } public static final class MediaStore.Images { @@ -38714,6 +38714,9 @@ package android.provider { public static interface MediaStore.Images.ImageColumns extends android.provider.MediaStore.MediaColumns { field public static final String DESCRIPTION = "description"; + field public static final String EXPOSURE_TIME = "exposure_time"; + field public static final String F_NUMBER = "f_number"; + field public static final String ISO = "iso"; field public static final String IS_PRIVATE = "isprivate"; field @Deprecated public static final String LATITUDE = "latitude"; field @Deprecated public static final String LONGITUDE = "longitude"; @@ -38762,28 +38765,45 @@ package android.provider { } public static interface MediaStore.MediaColumns extends android.provider.BaseColumns { + field public static final String ALBUM = "album"; + field public static final String ALBUM_ARTIST = "album_artist"; + field public static final String ARTIST = "artist"; + field public static final String AUTHOR = "author"; + field public static final String BITRATE = "bitrate"; field public static final String BUCKET_DISPLAY_NAME = "bucket_display_name"; field public static final String BUCKET_ID = "bucket_id"; + field public static final String CAPTURE_FRAMERATE = "capture_framerate"; + field public static final String CD_TRACK_NUMBER = "cd_track_number"; + field public static final String COMPILATION = "compilation"; + field public static final String COMPOSER = "composer"; field @Deprecated public static final String DATA = "_data"; field public static final String DATE_ADDED = "date_added"; field public static final String DATE_EXPIRES = "date_expires"; field public static final String DATE_MODIFIED = "date_modified"; field public static final String DATE_TAKEN = "datetaken"; + field public static final String DISC_NUMBER = "disc_number"; field public static final String DISPLAY_NAME = "_display_name"; field public static final String DOCUMENT_ID = "document_id"; field public static final String DURATION = "duration"; + field public static final String GENRE = "genre"; field public static final String HEIGHT = "height"; field public static final String INSTANCE_ID = "instance_id"; + field public static final String IS_FAVORITE = "is_favorite"; field public static final String IS_PENDING = "is_pending"; + field public static final String IS_TRASHED = "is_trashed"; field public static final String MIME_TYPE = "mime_type"; + field public static final String NUM_TRACKS = "num_tracks"; field public static final String ORIENTATION = "orientation"; field public static final String ORIGINAL_DOCUMENT_ID = "original_document_id"; field public static final String OWNER_PACKAGE_NAME = "owner_package_name"; field public static final String RELATIVE_PATH = "relative_path"; + field public static final String RESOLUTION = "resolution"; field public static final String SIZE = "_size"; field public static final String TITLE = "title"; field public static final String VOLUME_NAME = "volume_name"; field public static final String WIDTH = "width"; + field public static final String WRITER = "writer"; + field public static final String YEAR = "year"; } public static final class MediaStore.Video { @@ -38823,8 +38843,6 @@ package android.provider { } public static interface MediaStore.Video.VideoColumns extends android.provider.MediaStore.MediaColumns { - field public static final String ALBUM = "album"; - field public static final String ARTIST = "artist"; field public static final String BOOKMARK = "bookmark"; field public static final String CATEGORY = "category"; field public static final String COLOR_RANGE = "color_range"; @@ -38836,7 +38854,6 @@ package android.provider { field @Deprecated public static final String LATITUDE = "latitude"; field @Deprecated public static final String LONGITUDE = "longitude"; field @Deprecated public static final String MINI_THUMB_MAGIC = "mini_thumb_magic"; - field public static final String RESOLUTION = "resolution"; field public static final String TAGS = "tags"; } diff --git a/api/removed.txt b/api/removed.txt index 74a934672adbf..a395cc7865077 100644 --- a/api/removed.txt +++ b/api/removed.txt @@ -444,13 +444,12 @@ package android.provider { method @Deprecated @NonNull public static android.net.Uri createPending(@NonNull android.content.Context, @NonNull android.provider.MediaStore.PendingParams); method @Deprecated @NonNull public static java.util.Set getAllVolumeNames(@NonNull android.content.Context); method @Deprecated @NonNull public static android.provider.MediaStore.PendingSession openPending(@NonNull android.content.Context, @NonNull android.net.Uri); - method @Deprecated @NonNull public static android.net.Uri setIncludeTrashed(@NonNull android.net.Uri); - method @Deprecated public static void trash(@NonNull android.content.Context, @NonNull android.net.Uri); - method @Deprecated public static void trash(@NonNull android.content.Context, @NonNull android.net.Uri, long); - method @Deprecated public static void untrash(@NonNull android.content.Context, @NonNull android.net.Uri); } public static interface MediaStore.Audio.AudioColumns extends android.provider.MediaStore.MediaColumns { + field public static final String ALBUM = "album"; + field public static final String ARTIST = "artist"; + field public static final String COMPOSER = "composer"; field public static final String DURATION = "duration"; } @@ -458,6 +457,10 @@ package android.provider { field @Deprecated public static final String DESCRIPTION = "description"; } + public static interface MediaStore.Files.FileColumns extends android.provider.MediaStore.MediaColumns { + field public static final String TITLE = "title"; + } + public static interface MediaStore.Images.ImageColumns extends android.provider.MediaStore.MediaColumns { field public static final String BUCKET_DISPLAY_NAME = "bucket_display_name"; field public static final String BUCKET_ID = "bucket_id"; @@ -468,10 +471,6 @@ package android.provider { public static interface MediaStore.MediaColumns extends android.provider.BaseColumns { field @Deprecated public static final String GROUP_ID = "group_id"; - field @Deprecated public static final String HASH = "_hash"; - field @Deprecated public static final String IS_TRASHED = "is_trashed"; - field @Deprecated public static final String PRIMARY_DIRECTORY = "primary_directory"; - field @Deprecated public static final String SECONDARY_DIRECTORY = "secondary_directory"; } @Deprecated public static class MediaStore.PendingParams { @@ -491,11 +490,14 @@ package android.provider { } public static interface MediaStore.Video.VideoColumns extends android.provider.MediaStore.MediaColumns { + field public static final String ALBUM = "album"; + field public static final String ARTIST = "artist"; field public static final String BUCKET_DISPLAY_NAME = "bucket_display_name"; field public static final String BUCKET_ID = "bucket_id"; field public static final String DATE_TAKEN = "datetaken"; field public static final String DURATION = "duration"; field public static final String GROUP_ID = "group_id"; + field public static final String RESOLUTION = "resolution"; } public static final class Settings.Global extends android.provider.Settings.NameValueTable { diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java index a1333df138201..4153831584e9d 100644 --- a/core/java/android/provider/MediaStore.java +++ b/core/java/android/provider/MediaStore.java @@ -47,6 +47,7 @@ import android.graphics.PostProcessor; import android.media.ExifInterface; import android.media.MediaFile; import android.media.MediaFormat; +import android.media.MediaMetadataRetriever; import android.net.Uri; import android.os.Bundle; import android.os.CancellationSignal; @@ -589,9 +590,7 @@ public final class MediaStore { * @see MediaStore#setIncludeTrashed(Uri) * @see MediaStore#trash(Context, Uri) * @see MediaStore#untrash(Context, Uri) - * @removed */ - @Deprecated public static @NonNull Uri setIncludeTrashed(@NonNull Uri uri) { return uri.buildUpon().appendQueryParameter(PARAM_INCLUDE_TRASHED, "1").build(); } @@ -830,9 +829,7 @@ public final class MediaStore { * @see MediaStore#setIncludeTrashed(Uri) * @see MediaStore#trash(Context, Uri) * @see MediaStore#untrash(Context, Uri) - * @removed */ - @Deprecated public static void trash(@NonNull Context context, @NonNull Uri uri) { trash(context, uri, 48 * DateUtils.HOUR_IN_MILLIS); } @@ -850,9 +847,7 @@ public final class MediaStore { * @see MediaStore#setIncludeTrashed(Uri) * @see MediaStore#trash(Context, Uri) * @see MediaStore#untrash(Context, Uri) - * @removed */ - @Deprecated public static void trash(@NonNull Context context, @NonNull Uri uri, @DurationMillisLong long timeoutMillis) { if (timeoutMillis < 0) { @@ -874,9 +869,7 @@ public final class MediaStore { * @see MediaStore#setIncludeTrashed(Uri) * @see MediaStore#trash(Context, Uri) * @see MediaStore#untrash(Context, Uri) - * @removed */ - @Deprecated public static void untrash(@NonNull Context context, @NonNull Uri uri) { final ContentValues values = new ContentValues(); values.put(MediaColumns.IS_TRASHED, 0); @@ -907,26 +900,8 @@ public final class MediaStore { public static final String DATA = "_data"; /** - * Hash of the media item on disk. - *

- * Contains a 20-byte binary blob which is the SHA-1 hash of the file as - * persisted on disk. For performance reasons, the hash may not be - * immediately available, in which case a {@code NULL} value will be - * returned. If the underlying file is modified, this value will be - * cleared and recalculated. - *

- * If you require the hash of a specific item, you can call - * {@link ContentResolver#canonicalize(Uri)}, which will block until the - * hash is calculated. - * - * @removed - */ - @Deprecated - @Column(value = Cursor.FIELD_TYPE_BLOB, readOnly = true) - public static final String HASH = "_hash"; - - /** - * The size of the media item. + * Indexed value of {@link File#length()} extracted from this media + * item. */ @BytesLong @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) @@ -942,12 +917,6 @@ public final class MediaStore { @Column(Cursor.FIELD_TYPE_STRING) public static final String DISPLAY_NAME = "_display_name"; - /** - * The title of the media item. - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) - public static final String TITLE = "title"; - /** * The time the media item was first added. */ @@ -956,14 +925,22 @@ public final class MediaStore { public static final String DATE_ADDED = "date_added"; /** - * The time the media item was last modified. + * Indexed value of {@link File#lastModified()} extracted from this + * media item. */ @CurrentTimeSecondsLong @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) public static final String DATE_MODIFIED = "date_modified"; /** - * The time the media item was taken. + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_DATE} or + * {@link ExifInterface#TAG_DATETIME_ORIGINAL} extracted from this media + * item. + *

+ * Note that images must define both + * {@link ExifInterface#TAG_DATETIME_ORIGINAL} and + * {@code ExifInterface#TAG_OFFSET_TIME_ORIGINAL} to reliably determine + * this value in relation to the epoch. */ @CurrentTimeMillisLong @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) @@ -988,17 +965,6 @@ public final class MediaStore { @Column(Cursor.FIELD_TYPE_STRING) public static final String MIME_TYPE = "mime_type"; - /** - * The MTP object handle of a newly transfered file. - * Used to pass the new file's object handle through the media scanner - * from MTP to the media provider - * For internal use only by MTP, media scanner and media provider. - * @hide - */ - @Deprecated - // @Column(Cursor.FIELD_TYPE_INTEGER) - public static final String MEDIA_SCANNER_NEW_OBJECT_ID = "media_scanner_new_object_id"; - /** * Non-zero if the media file is drm-protected * @hide @@ -1012,6 +978,10 @@ public final class MediaStore { * Flag indicating if a media item is pending, and still being inserted * by its owner. While this flag is set, only the owner of the item can * open the underlying file; requests from other apps will be rejected. + *

+ * Pending items are retained either until they are published by setting + * the field to {@code 0}, or until they expire as defined by + * {@link #DATE_EXPIRES}. * * @see MediaStore#setIncludePending(Uri) */ @@ -1020,37 +990,53 @@ public final class MediaStore { /** * Flag indicating if a media item is trashed. + *

+ * Trashed items are retained until they expire as defined by + * {@link #DATE_EXPIRES}. * * @see MediaColumns#IS_TRASHED * @see MediaStore#setIncludeTrashed(Uri) * @see MediaStore#trash(Context, Uri) * @see MediaStore#untrash(Context, Uri) - * @removed */ - @Deprecated @Column(Cursor.FIELD_TYPE_INTEGER) public static final String IS_TRASHED = "is_trashed"; /** * The time the media item should be considered expired. Typically only - * meaningful in the context of {@link #IS_PENDING}. + * meaningful in the context of {@link #IS_PENDING} or + * {@link #IS_TRASHED}. */ @CurrentTimeSecondsLong @Column(Cursor.FIELD_TYPE_INTEGER) public static final String DATE_EXPIRES = "date_expires"; /** - * The width of the media item, in pixels. + * Indexed value of + * {@link MediaMetadataRetriever#METADATA_KEY_VIDEO_WIDTH}, + * {@link MediaMetadataRetriever#METADATA_KEY_IMAGE_WIDTH} or + * {@link ExifInterface#TAG_IMAGE_WIDTH} extracted from this media item. */ @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) public static final String WIDTH = "width"; /** - * The height of the media item, in pixels. + * Indexed value of + * {@link MediaMetadataRetriever#METADATA_KEY_VIDEO_HEIGHT}, + * {@link MediaMetadataRetriever#METADATA_KEY_IMAGE_HEIGHT} or + * {@link ExifInterface#TAG_IMAGE_LENGTH} extracted from this media + * item. */ @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) public static final String HEIGHT = "height"; + /** + * Calculated value that combines {@link #WIDTH} and {@link #HEIGHT} + * into a user-presentable string. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String RESOLUTION = "resolution"; + /** * Package name that contributed this media. The value may be * {@code NULL} if ownership cannot be reliably determined. @@ -1096,28 +1082,6 @@ public final class MediaStore { @Column(Cursor.FIELD_TYPE_STRING) public static final String RELATIVE_PATH = "relative_path"; - /** - * The primary directory name this media exists under. The value may be - * {@code NULL} if the media doesn't have a primary directory name. - * - * @removed - * @deprecated Replaced by {@link #RELATIVE_PATH}. - */ - @Column(Cursor.FIELD_TYPE_STRING) - @Deprecated - public static final String PRIMARY_DIRECTORY = "primary_directory"; - - /** - * The secondary directory name this media exists under. The value may - * be {@code NULL} if the media doesn't have a secondary directory name. - * - * @removed - * @deprecated Replaced by {@link #RELATIVE_PATH}. - */ - @Column(Cursor.FIELD_TYPE_STRING) - @Deprecated - public static final String SECONDARY_DIRECTORY = "secondary_directory"; - /** * The primary bucket ID of this media item. This can be useful to * present the user a first-level clustering of related media items. @@ -1191,18 +1155,171 @@ public final class MediaStore { public static final String ORIGINAL_DOCUMENT_ID = "original_document_id"; /** - * The duration of the media item. + * Indexed value of + * {@link MediaMetadataRetriever#METADATA_KEY_VIDEO_ROTATION}, + * {@link MediaMetadataRetriever#METADATA_KEY_IMAGE_ROTATION}, or + * {@link ExifInterface#TAG_ORIENTATION} extracted from this media item. + *

+ * For consistency the indexed value is expressed in degrees, such as 0, + * 90, 180, or 270. + */ + @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) + public static final String ORIENTATION = "orientation"; + + /** + * Flag indicating if the media item has been marked as being a + * "favorite" by the user. + */ + @Column(Cursor.FIELD_TYPE_INTEGER) + public static final String IS_FAVORITE = "is_favorite"; + + // ======================================= + // ==== MediaMetadataRetriever values ==== + // ======================================= + + /** + * Indexed value of + * {@link MediaMetadataRetriever#METADATA_KEY_CD_TRACK_NUMBER} extracted + * from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String CD_TRACK_NUMBER = "cd_track_number"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_ALBUM} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String ALBUM = "album"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_ARTIST} + * or {@link ExifInterface#TAG_ARTIST} extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String ARTIST = "artist"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_AUTHOR} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String AUTHOR = "author"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_COMPOSER} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String COMPOSER = "composer"; + + // METADATA_KEY_DATE is DATE_TAKEN + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_GENRE} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String GENRE = "genre"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_TITLE} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String TITLE = "title"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_YEAR} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) + public static final String YEAR = "year"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_DURATION} + * extracted from this media item. */ @DurationMillisLong @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) public static final String DURATION = "duration"; /** - * The orientation for the media item, expressed in degrees. For - * example, 0, 90, 180, or 270 degrees. + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_NUM_TRACKS} + * extracted from this media item. */ @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) - public static final String ORIENTATION = "orientation"; + public static final String NUM_TRACKS = "num_tracks"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_WRITER} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String WRITER = "writer"; + + // METADATA_KEY_MIMETYPE is MIME_TYPE + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_ALBUMARTIST} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String ALBUM_ARTIST = "album_artist"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_DISC_NUMBER} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String DISC_NUMBER = "disc_number"; + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_COMPILATION} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String COMPILATION = "compilation"; + + // HAS_AUDIO is ignored + // HAS_VIDEO is ignored + // VIDEO_WIDTH is WIDTH + // VIDEO_HEIGHT is HEIGHT + + /** + * Indexed value of {@link MediaMetadataRetriever#METADATA_KEY_BITRATE} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) + public static final String BITRATE = "bitrate"; + + // TIMED_TEXT_LANGUAGES is ignored + // IS_DRM is ignored + // LOCATION is LATITUDE and LONGITUDE + // VIDEO_ROTATION is ORIENTATION + + /** + * Indexed value of + * {@link MediaMetadataRetriever#METADATA_KEY_CAPTURE_FRAMERATE} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_FLOAT, readOnly = true) + public static final String CAPTURE_FRAMERATE = "capture_framerate"; + + // HAS_IMAGE is ignored + // IMAGE_COUNT is ignored + // IMAGE_PRIMARY is ignored + // IMAGE_WIDTH is WIDTH + // IMAGE_HEIGHT is HEIGHT + // IMAGE_ROTATION is ORIENTATION + // VIDEO_FRAME_COUNT is ignored + // EXIF_OFFSET is ignored + // EXIF_LENGTH is ignored + // COLOR_STANDARD is ignored + // COLOR_TRANSFER is ignored + // COLOR_RANGE is ignored + // SAMPLERATE is ignored + // BITS_PER_SAMPLE is ignored } /** @@ -1331,10 +1448,7 @@ public final class MediaStore { @Column(Cursor.FIELD_TYPE_STRING) public static final String MIME_TYPE = "mime_type"; - /** - * The title of the media item. - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + /** @removed promoted to parent interface */ public static final String TITLE = "title"; /** @@ -1588,12 +1702,6 @@ public final class MediaStore { * Image metadata columns. */ public interface ImageColumns extends MediaColumns { - /** - * The description of the image - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) - public static final String DESCRIPTION = "description"; - /** * The picasa id of the image * @@ -1656,6 +1764,34 @@ public final class MediaStore { public static final String BUCKET_DISPLAY_NAME = "bucket_display_name"; /** @removed promoted to parent interface */ public static final String GROUP_ID = "group_id"; + + /** + * Indexed value of {@link ExifInterface#TAG_IMAGE_DESCRIPTION} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String DESCRIPTION = "description"; + + /** + * Indexed value of {@link ExifInterface#TAG_EXPOSURE_TIME} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String EXPOSURE_TIME = "exposure_time"; + + /** + * Indexed value of {@link ExifInterface#TAG_F_NUMBER} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + public static final String F_NUMBER = "f_number"; + + /** + * Indexed value of {@link ExifInterface#TAG_ISO_SPEED_RATINGS} + * extracted from this media item. + */ + @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) + public static final String ISO = "iso"; } public static final class Media implements ImageColumns { @@ -2093,10 +2229,7 @@ public final class MediaStore { @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) public static final String ARTIST_ID = "artist_id"; - /** - * The artist who created the audio file, if any - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + /** @removed promoted to parent interface */ public static final String ARTIST = "artist"; /** @@ -2106,14 +2239,6 @@ public final class MediaStore { @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) public static final String ALBUM_ARTIST = "album_artist"; - /** - * Whether the song is part of a compilation - * @hide - */ - @Deprecated - // @Column(Cursor.FIELD_TYPE_STRING) - public static final String COMPILATION = "compilation"; - /** * A non human readable key calculated from the ARTIST, used for * searching, sorting and grouping @@ -2131,10 +2256,7 @@ public final class MediaStore { @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) public static final String ARTIST_KEY = "artist_key"; - /** - * The composer of the audio file, if any - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + /** @removed promoted to parent interface */ public static final String COMPOSER = "composer"; /** @@ -2143,10 +2265,7 @@ public final class MediaStore { @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) public static final String ALBUM_ID = "album_id"; - /** - * The album the audio file is from, if any - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + /** @removed promoted to parent interface */ public static final String ALBUM = "album"; /** @@ -2973,23 +3092,11 @@ public final class MediaStore { public interface VideoColumns extends MediaColumns { /** @removed promoted to parent interface */ public static final String DURATION = "duration"; - - /** - * The artist who created the video file, if any - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + /** @removed promoted to parent interface */ public static final String ARTIST = "artist"; - - /** - * The album the video file is from, if any - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + /** @removed promoted to parent interface */ public static final String ALBUM = "album"; - - /** - * The resolution of the video file, formatted as "XxY" - */ - @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) + /** @removed promoted to parent interface */ public static final String RESOLUTION = "resolution"; /**