Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 762194c2 authored by Jaewan Kim's avatar Jaewan Kim
Browse files

Add more comment for MediaSession.setMetadata

To reduce the memory usage, MediaSession may have a scaled down copy
of Bitmap metadata. Add the comment for that not to surprise developers.

Bug: 29149751
Change-Id: I6d3542a3bf40e218c31b0e269309de7a51dbc87d
parent 37c5c22d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -804,8 +804,9 @@ public final class MediaMetadata implements Parcelable {
         * <li>{@link #METADATA_KEY_DISPLAY_ICON}</li>
         * </ul>
         * <p>
         * Large bitmaps may be scaled down by the system. To pass full
         * resolution images {@link Uri Uris} should be used with
         * 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
+4 −2
Original line number Diff line number Diff line
@@ -407,9 +407,11 @@ public final class MediaSession {

    /**
     * Update the current metadata. New metadata can be created using
     * {@link android.media.MediaMetadata.Builder}.
     * {@link android.media.MediaMetadata.Builder}. This operation may take time proportional to
     * the size of the bitmap to replace large bitmaps with a scaled down copy.
     *
     * @param metadata The new metadata
     * @see android.media.MediaMetadata.Builder#putBitmap
     */
    public void setMetadata(@Nullable MediaMetadata metadata) {
        if (metadata != null) {