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

Commit da3ec672 authored by En-Shuo Hsu's avatar En-Shuo Hsu
Browse files

Ignore redundant |BTIF_AV_SUSPEND_STREAM_REQ_EVT|

Bug: 300455937
Test: mmm packages/modules/Bluetooth
Test: Manually tested a2dp on ChromeOS
Change-Id: I9f92104ebc0300b6d8d947f8e00ce4e3cda6eb62
parent 8a7e760f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2591,6 +2591,12 @@ bool BtifAvStateMachine::StateStarted::ProcessEvent(uint32_t event,
               ADDRESS_TO_LOGGABLE_CSTR(peer_.PeerAddress()),
               BtifAvEvent::EventName(event).c_str(),
               peer_.FlagsToString().c_str());

      // There is a pending LocalSuspend already, ignore.
      if (peer_.CheckFlags(BtifAvPeer::kFlagLocalSuspendPending)) {
        break;
      }

      // Set pending flag to ensure the BTIF task is not trying to restart
      // the stream while suspend is in progress.
      peer_.SetFlags(BtifAvPeer::kFlagLocalSuspendPending);