Skip to content

Commit 46cc0e7

Browse files
committed
Use MediaMetadata constants to make Lint happy
#cherrypick PiperOrigin-RevId: 773670933 (cherry picked from commit 0d688be)
1 parent cc17960 commit 46cc0e7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

libraries/session/src/test/java/androidx/media3/session/MediaMetadataCompatTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ public void convertToMediaMetadata_withBitmap_keepSameBitmapInstance() {
6161
MediaMetadata mediaMetadata = testMediaMetadataCompat.getMediaMetadata();
6262

6363
// Verify that the long/text/string/rating values are set correctly.
64-
assertThat(mediaMetadata.getLong(MediaMetadataCompat.METADATA_KEY_DURATION)).isEqualTo(1000);
65-
assertThat(mediaMetadata.getText(MediaMetadataCompat.METADATA_KEY_ARTIST).toString())
64+
assertThat(mediaMetadata.getLong(MediaMetadata.METADATA_KEY_DURATION)).isEqualTo(1000);
65+
assertThat(mediaMetadata.getText(MediaMetadata.METADATA_KEY_ARTIST).toString())
6666
.isEqualTo("artist");
67-
assertThat(mediaMetadata.getString(MediaMetadataCompat.METADATA_KEY_TITLE)).isEqualTo("title");
68-
assertThat(mediaMetadata.getRating(MediaMetadataCompat.METADATA_KEY_RATING).hasHeart())
69-
.isTrue();
67+
assertThat(mediaMetadata.getString(MediaMetadata.METADATA_KEY_TITLE)).isEqualTo("title");
68+
assertThat(mediaMetadata.getRating(MediaMetadata.METADATA_KEY_RATING).hasHeart()).isTrue();
7069

7170
// Verify that the bitmap instances are the same as the original.
7271
Bitmap bitmap = mediaMetadata.getBitmap(MediaMetadata.METADATA_KEY_ART);

0 commit comments

Comments
 (0)