Fix bug 5327199 Recycle bitmaps in RemoteControlClient

When applying the new bitmap from the editor to the client,
 recycle the old bitmap, and set the reference to the editor
 bitmap to null.

Change-Id: I7d79e4b8410e5035fa51b20be4b1ada391c84c28
This commit is contained in:
Jean-Michel Trivi
2011-09-16 10:41:04 -07:00
parent ebdcae732f
commit 34d0d300ca

View File

@@ -482,7 +482,11 @@ public class RemoteControlClient
synchronized(mCacheLock) {
// assign the edited data
mMetadata = new Bundle(mEditorMetadata);
if ((mArtwork != null) && (!mArtwork.equals(mEditorArtwork))) {
mArtwork.recycle();
}
mArtwork = mEditorArtwork;
mEditorArtwork = null;
if (mMetadataChanged & mArtworkChanged) {
// send to remote control display if conditions are met
sendMetadataWithArtwork_syncCacheLock();