Cannot compare Binder references for RC display to unregister

Cannot trust references to IRemoteControlDisplay to remain the
 same when removing a RemoteControlDisplay, compare the
 result of .asBinder() instead.

Change-Id: Ib2e82aa24bd4b12804bccff94a6a0090ff83bea8
This commit is contained in:
Jean-Michel Trivi
2011-08-26 18:33:02 -07:00
parent 18e7bce523
commit 7309c83b95

View File

@@ -703,7 +703,7 @@ public class RemoteControlClient
private void onUnplugDisplay(IRemoteControlDisplay rcd) {
synchronized(mCacheLock) {
if ((mRcDisplay != null) && (mRcDisplay.equals(rcd))) {
if ((mRcDisplay != null) && (mRcDisplay.asBinder().equals(rcd.asBinder()))) {
mRcDisplay = null;
mArtworkExpectedWidth = ARTWORK_DEFAULT_SIZE;
mArtworkExpectedHeight = ARTWORK_DEFAULT_SIZE;