From 56c021ffd8490a7cfc815ee76f7109e8a1621df7 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 9 Apr 2019 10:11:25 -0600 Subject: [PATCH] Add AlbumColumns.ARTIST_ID. As pointed out by developers, we already have ARTIST, so we should also have ARTIST_ID. Bug: 130193406 Test: atest --test-mapping packages/providers/MediaProvider Change-Id: I46b4de38a08a1ebb6951d8329070438d142888ad --- api/current.txt | 1 + core/java/android/provider/MediaStore.java | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api/current.txt b/api/current.txt index 5997043cdd4ab..12362f0d19073 100644 --- a/api/current.txt +++ b/api/current.txt @@ -38536,6 +38536,7 @@ package android.provider { field public static final String ALBUM_ID = "album_id"; field 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 public static final String FIRST_YEAR = "minyear"; field public static final String LAST_YEAR = "maxyear"; field public static final String NUMBER_OF_SONGS = "numsongs"; diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java index bda6ed19d3c13..0b1647d05ef4c 100644 --- a/core/java/android/provider/MediaStore.java +++ b/core/java/android/provider/MediaStore.java @@ -2676,7 +2676,13 @@ public final class MediaStore { public static final String ALBUM = "album"; /** - * The artist whose songs appear on this album + * The ID of the artist whose songs appear on this album. + */ + @Column(value = Cursor.FIELD_TYPE_INTEGER, readOnly = true) + public static final String ARTIST_ID = "artist_id"; + + /** + * The name of the artist whose songs appear on this album. */ @Column(value = Cursor.FIELD_TYPE_STRING, readOnly = true) public static final String ARTIST = "artist";