media/src/main/java/androidx/media/MediaMetadata2.java
public @NonNull Builder putBitmap(@NonNull @BitmapKey String key,
                @Nullable Bitmap value) {
            if (key == null) {
                throw new IllegalArgumentException("key shouldn't be null");
            }
            if (METADATA_KEYS_TYPE.containsKey(key)) {
                if (METADATA_KEYS_TYPE.get(key) != METADATA_TYPE_BITMAP) {
                    throw new IllegalArgumentException("The " + key
                            + " key cannot be used to put a Bitmap");
                }
            }
            mBundle.putParcelable(key, value);
            return this;
        }
/**
         * Put a {@link Bitmap} into the metadata. Custom keys may be used, but
         * if the METADATA_KEYs defined in this class are used they may only be
         * one of the following:
         * <ul>
         * <li>{@link #METADATA_KEY_ART}</li>
         * <li>{@link #METADATA_KEY_ALBUM_ART}</li>
         * <li>{@link #METADATA_KEY_DISPLAY_ICON}</li>
         * </ul>
         * Large bitmaps may be scaled down by the system when
         * {@link android.media.session.MediaSession#setMetadata} is called.
         * To pass full resolution images {@link Uri Uris} should be used with
         * {@link #putString}.
         *
         * @param key The key for referencing this value
         * @param value The Bitmap to store
         * @return The Builder to allow chaining
         */
Put a  Bitmap into the metadata. Custom keys may be used, but
if the METADATA_KEYs defined in this class are used they may only be
one of the following:

 #METADATA_KEY_ART
 #METADATA_KEY_ALBUM_ART
 #METADATA_KEY_DISPLAY_ICON

Large bitmaps may be scaled down by the system when
android.media.session.MediaSession#setMetadata is called.
To pass full resolution images  Uri Uris should be used with
#putString.

@param key The key for referencing this value
@param value The Bitmap to store
@return The Builder to allow chaining
Put a Bitmap into the metadata . Custom keys may be used but if the METADATA_KEYs defined in this class are used they may only be one of the following : #METADATA_KEY_ART #METADATA_KEY_ALBUM_ART #METADATA_KEY_DISPLAY_ICON Large bitmaps may be scaled down by the system when android . media . session . MediaSession#setMetadata is called . To pass full resolution images Uri Uris should be used with #putString . @param key The key for referencing this value @param value The Bitmap to store @return The Builder to allow chaining
public @NonNull Builder putBitmap(@NonNull @BitmapKey String key,
                @Nullable Bitmap value) {
            if (key == null) {
                throw new IllegalArgumentException("key shouldn't be null");
            }
            if (METADATA_KEYS_TYPE.containsKey(key)) {
                if (METADATA_KEYS_TYPE.get(key) != METADATA_TYPE_BITMAP) {
                    throw new IllegalArgumentException("The " + key
                            + " key cannot be used to put a Bitmap");
                }
            }
            mBundle.putParcelable(key, value);
            return this;
        }
public @ NonNull Builder putBitmap ( @ NonNull @ BitmapKey String key , @ Nullable Bitmap value ) { if ( key == null ) { throw new IllegalArgumentException ( "key shouldn't be null" ) ; } if ( METADATA_KEYS_TYPE . containsKey ( key ) ) { if ( METADATA_KEYS_TYPE . get ( key ) != METADATA_TYPE_BITMAP ) { throw new IllegalArgumentException ( "The " + key + " key cannot be used to put a Bitmap" ) ; } } mBundle . putParcelable ( key , value ) ; return this ; }
Put a {@link Bitmap} into the metadata.
Put a { @link Bitmap } into the metadata .