OSDN Git Service

AVRCP: Advance iterator before deleting it
authorHansong Zhang <hsz@google.com>
Wed, 7 Oct 2020 21:50:15 +0000 (14:50 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 8 Oct 2020 00:31:38 +0000 (00:31 +0000)
commit6370db808669a440f815b463d10d0664126dc4c7
tree118d00f76849995e65c4f0efcffdd3620e0b266e
parent27d85b2dbdf9b458508c3d120cd6e6897e847500
AVRCP: Advance iterator before deleting it

When we invoke instance_->avrc_->Close(), it will invoke the callback in
AcceptorControlCb by the state machine from AVCT, and the iterator will
be deleted. Now we advanece the iterator first.

Bug: 169747177
Test: Connect to a speaker with AVRCP, and turn off Bluetooth
Tag: #stability
Change-Id: If4ed403d355242da48b7ee49dd74784f43de1b1d
profile/avrcp/connection_handler.cc