Don't try to scale the bitmaps for null MediaMetadata.

Bug: 18586572
Change-Id: I133e58eeb05136ca82cbd35840b68ebedd9ec365
This commit is contained in:
Michael Wright
2014-12-09 13:16:26 -08:00
parent 14c436897c
commit f32bd3c5cd

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