Skip to content

Commit f79ec36

Browse files
jmtriviAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug 5327199 Recycle bitmaps in RemoteControlClient" into ics-factoryrom
2 parents 218148f + 34d0d30 commit f79ec36

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

media/java/android/media/RemoteControlClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,11 @@ public synchronized void apply() {
482482
synchronized(mCacheLock) {
483483
// assign the edited data
484484
mMetadata = new Bundle(mEditorMetadata);
485+
if ((mArtwork != null) && (!mArtwork.equals(mEditorArtwork))) {
486+
mArtwork.recycle();
487+
}
485488
mArtwork = mEditorArtwork;
489+
mEditorArtwork = null;
486490
if (mMetadataChanged & mArtworkChanged) {
487491
// send to remote control display if conditions are met
488492
sendMetadataWithArtwork_syncCacheLock();

0 commit comments

Comments
 (0)