media/src/main/java/androidx/media/MediaMetadata2.java
public @NonNull Builder putLong(@NonNull @LongKey String key, long 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_LONG) {
                    throw new IllegalArgumentException("The " + key
                            + " key cannot be used to put a long");
                }
            }
            mBundle.putLong(key, value);
            return this;
        }
/**
         * Put a long value 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_DURATION}</li>
         * <li>{@link #METADATA_KEY_TRACK_NUMBER}</li>
         * <li>{@link #METADATA_KEY_NUM_TRACKS}</li>
         * <li>{@link #METADATA_KEY_DISC_NUMBER}</li>
         * <li>{@link #METADATA_KEY_YEAR}</li>
         * <li>{@link #METADATA_KEY_BT_FOLDER_TYPE}</li>
         * <li>{@link #METADATA_KEY_ADVERTISEMENT}</li>
         * <li>{@link #METADATA_KEY_DOWNLOAD_STATUS}</li>
         * </ul>
         *
         * @param key The key for referencing this value
         * @param value The String value to store
         * @return The Builder to allow chaining
         */
Put a long value into the metadata.

@param key The key for referencing this value
@param value The String value to store
@return The Builder to allow chaining
Put a long value into the metadata . @param key The key for referencing this value @param value The String value to store @return The Builder to allow chaining
public @NonNull Builder putLong(@NonNull @LongKey String key, long 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_LONG) {
                    throw new IllegalArgumentException("The " + key
                            + " key cannot be used to put a long");
                }
            }
            mBundle.putLong(key, value);
            return this;
        }
public @ NonNull Builder putLong ( @ NonNull @ LongKey String key , long 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_LONG ) { throw new IllegalArgumentException ( "The " + key + " key cannot be used to put a long" ) ; } } mBundle . putLong ( key , value ) ; return this ; }
Put a long value into the metadata.
Put a long value into the metadata .