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

Commit 9aea99cc authored by Ted Wang's avatar Ted Wang
Browse files

Return current song id if active quene item id is not avaliable

Bug: 220799354
Test: Manual
Change-Id: I71a3bcd3b9f079ebc380d088859184711608b5d2
parent cfc4b2f5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -392,10 +392,10 @@ public class AvrcpTargetService extends ProfileService {

    String getCurrentMediaId() {
        String id = mMediaPlayerList.getCurrentMediaId();
        if (id != null) return id;
        if (id != null && !id.isEmpty()) return id;

        Metadata song = getCurrentSongInfo();
        if (song != null) return song.mediaId;
        if (song != null && !song.mediaId.isEmpty()) return song.mediaId;

        // We always want to return something, the error string just makes debugging easier
        return "error";