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

Commit 708e9b16 authored by eric_kuang.rs's avatar eric_kuang.rs Committed by eric kuang
Browse files

Add a condition to check if curr_song_id is "Not provided" when there is no...

Add a condition to check if curr_song_id is "Not provided" when there is no media selected for playing.

Test: atest AvrcpDeviceTest

BQB test: AVRCPTGNFYBV-04-C

Bug: 373470150

Change-Id: I0ecb99eb5240779e0a9a606f2c62c411200e8705
parent 91e35b08
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -603,7 +603,8 @@ void Device::TrackChangedNotificationResponse(uint8_t label, bool interim, std::
  // PTS BV-04-C and BV-5-C assume browsing not supported
  if (stack_config_get_interface()->get_pts_avrcp_test()) {
    log::warn("{}: pts test mode", address_);
    uint64_t uid = curr_song_id.empty() ? 0xffffffffffffffff : 0;
    uint64_t uid =
            (curr_song_id.empty() || curr_song_id == "Not Provided") ? 0xffffffffffffffff : 0;
    auto response = RegisterNotificationResponseBuilder::MakeTrackChangedBuilder(interim, uid);
    send_message_cb_.Run(label, false, std::move(response));
    return;