diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/session/MediaSession.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java index e13f008..df4bc78 100644 --- a/media/java/android/media/session/MediaSession.java +++ b/media/java/android/media/session/MediaSession.java @@ -412,7 +412,9 @@ public final class MediaSession { * @param metadata The new metadata */ public void setMetadata(@Nullable MediaMetadata metadata) { - metadata = (new MediaMetadata.Builder(metadata, mMaxBitmapSize)).build(); + if (metadata != null ) { + metadata = (new MediaMetadata.Builder(metadata, mMaxBitmapSize)).build(); + } try { mBinder.setMetadata(metadata); } catch (RemoteException e) { |