Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d02e78f2 authored by Sal Savage's avatar Sal Savage
Browse files

Compare image handles with equals() and not ==

Bug: b/152655199
Test: atest BluetoothInstrumentationTests
Change-Id: I70a666ba09202e6cf84b7cd48b67cf8e0cbf00eb
parent a3920371
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -187,8 +187,10 @@ class AvrcpPlayer {

    public synchronized boolean notifyImageDownload(String handle, Uri imageUri) {
        if (DBG) Log.d(TAG, "Got an image download -- handle=" + handle + ", uri=" + imageUri);
        if (mCurrentTrack != null && mCurrentTrack.getCoverArtHandle() == handle) {
        if (handle == null || imageUri == null || mCurrentTrack == null) return false;
        if (handle.equals(mCurrentTrack.getCoverArtHandle())) {
            mCurrentTrack.setCoverArtLocation(imageUri);
            if (DBG) Log.d(TAG, "Handle '" + handle + "' was added to current track.");
            return true;
        }
        return false;