[go: nahoru, domu]

Add a key constant for series content id in MediaMetadata

Bug: 187380946
Relnote: N/A
Test: ./gradlew :media:media:updateApi
Change-Id: I4391eca6eeb1c2de3d939b3421ef1072b4cf6a5e
diff --git a/media/media/api/current.txt b/media/media/api/current.txt
index ab43c37..e82dbe2 100644
--- a/media/media/api/current.txt
+++ b/media/media/api/current.txt
@@ -729,6 +729,7 @@
     field public static final String METADATA_KEY_IS_ADVERTISEMENT = "android.media.metadata.ADVERTISEMENT";
     field public static final String METADATA_KEY_IS_EXPLICIT = "android.media.IS_EXPLICIT";
     field public static final String METADATA_KEY_NEXT_EPISODE_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_NEXT_EPISODE_CONTENT_ID";
+    field public static final String METADATA_KEY_SERIES_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_SERIES_CONTENT_ID";
     field public static final long METADATA_VALUE_ATTRIBUTE_PRESENT = 1L; // 0x1L
     field public static final String PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_INTENT = "android.media.extras.ERROR_RESOLUTION_ACTION_INTENT";
     field public static final String PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_LABEL = "android.media.extras.ERROR_RESOLUTION_ACTION_LABEL";
diff --git a/media/media/api/public_plus_experimental_current.txt b/media/media/api/public_plus_experimental_current.txt
index cf5874c..d9037ca 100644
--- a/media/media/api/public_plus_experimental_current.txt
+++ b/media/media/api/public_plus_experimental_current.txt
@@ -729,6 +729,7 @@
     field public static final String METADATA_KEY_IS_ADVERTISEMENT = "android.media.metadata.ADVERTISEMENT";
     field public static final String METADATA_KEY_IS_EXPLICIT = "android.media.IS_EXPLICIT";
     field public static final String METADATA_KEY_NEXT_EPISODE_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_NEXT_EPISODE_CONTENT_ID";
+    field public static final String METADATA_KEY_SERIES_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_SERIES_CONTENT_ID";
     field public static final long METADATA_VALUE_ATTRIBUTE_PRESENT = 1L; // 0x1L
     field public static final String PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_INTENT = "android.media.extras.ERROR_RESOLUTION_ACTION_INTENT";
     field public static final String PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_LABEL = "android.media.extras.ERROR_RESOLUTION_ACTION_LABEL";
diff --git a/media/media/api/restricted_current.txt b/media/media/api/restricted_current.txt
index 3f5c9d9..bd39a46 100644
--- a/media/media/api/restricted_current.txt
+++ b/media/media/api/restricted_current.txt
@@ -761,6 +761,7 @@
     field public static final String METADATA_KEY_IS_ADVERTISEMENT = "android.media.metadata.ADVERTISEMENT";
     field public static final String METADATA_KEY_IS_EXPLICIT = "android.media.IS_EXPLICIT";
     field public static final String METADATA_KEY_NEXT_EPISODE_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_NEXT_EPISODE_CONTENT_ID";
+    field public static final String METADATA_KEY_SERIES_CONTENT_ID = "androidx.media.MediaMetadatCompat.METADATA_KEY_SERIES_CONTENT_ID";
     field public static final long METADATA_VALUE_ATTRIBUTE_PRESENT = 1L; // 0x1L
     field public static final String PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_INTENT = "android.media.extras.ERROR_RESOLUTION_ACTION_INTENT";
     field public static final String PLAYBACK_STATE_EXTRAS_KEY_ERROR_RESOLUTION_ACTION_LABEL = "android.media.extras.ERROR_RESOLUTION_ACTION_LABEL";
diff --git a/media/media/src/main/java/androidx/media/utils/MediaConstants.java b/media/media/src/main/java/androidx/media/utils/MediaConstants.java
index 8d81004..bd04425 100644
--- a/media/media/src/main/java/androidx/media/utils/MediaConstants.java
+++ b/media/media/src/main/java/androidx/media/utils/MediaConstants.java
@@ -113,7 +113,7 @@
     /**
      * Bundle key used for media content id in {@link MediaMetadataCompat metadata}, should contain
      * the same ID provided to Media Actions Catalog in reference to this title (e.g., episode,
-     * movie). Google uses this information to allow users to resume watching this title on your app
+     * movie). This information can be used to allow users to resume watching this title on your app
      * across the supported surfaces (e.g., Android TV's Play Next row)
      *
      * <p>TYPE: String
@@ -126,12 +126,10 @@
 
     /**
      * Bundle key used for next episode's media content ID in {@link MediaMetadataCompat metadata},
-     * following the same ID and format provided to
-     * <a href="https://developers.google.com/actions/media">Media Actions Catalog</a> in reference
-     * to the next episode of the current title episode. Google uses this information to allow users
-     * to resume watching the next episode of this title on your app once the current episode ends
-     * across the supported surfaces (e.g., Android TV's Play Next row). This can be left blank for
-     * movies.
+     * following the same ID and format provided to Media Actions Catalog in reference to the next
+     * episode of the current title episode. This information can be used to allow users to resume
+     * watching the next episode of this title on your app once the current episode ends across the
+     * supported surfaces (e.g., Android TV's Play Next row). This can be left blank for movies.
      *
      * <p>TYPE: String
      *
@@ -142,6 +140,22 @@
             "androidx.media.MediaMetadatCompat.METADATA_KEY_NEXT_EPISODE_CONTENT_ID";
 
     /**
+     * Bundle key used for the TV series's media content ID in {@link MediaMetadataCompat metadata},
+     * following the same ID and format provided to Media Actions Catalog</a> in reference to the
+     * TV series of the title episode. This information can be used to allow users to resume
+     * watching the current episode or next episode of this title on your app across the
+     * supported surfaces (e.g., Android TV's Play Next row). This value is only valid for TV
+     * Episode content type.
+     *
+     * <p>TYPE: String
+     *
+     * @see MediaMetadataCompat
+     */
+    @SuppressLint("IntentName")
+    public static final String METADATA_KEY_SERIES_CONTENT_ID =
+            "androidx.media.MediaMetadatCompat.METADATA_KEY_SERIES_CONTENT_ID";
+
+    /**
      * Key sent through a key-value mapping in {@link MediaMetadataCompat#getLong(String)} or in the
      * {@link MediaDescriptionCompat#getExtras()} bundle to the hosting {@link MediaBrowserCompat}
      * to indicate that the corresponding {@link MediaMetadataCompat} or {@link