Merge "Don't try to scale the bitmaps for null MediaMetadata." into lmp-mr1-dev

This commit is contained in:
Michael Wright
2014-12-09 23:39:48 +00:00
committed by Android (Google) Code Review

View File

@@ -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) {