OSDN Git Service

HFP: remove the dropped HF connection request message in btif connect_queue and advan...
authorjonerlin <jonerlin@google.com>
Mon, 23 Sep 2019 15:25:48 +0000 (23:25 +0800)
committerjonerlin <jonerlin@google.com>
Wed, 16 Oct 2019 12:19:16 +0000 (20:19 +0800)
commitae0e2d4c4c9927313855a9c1eaae08ac394c5f88
tree0768643cb6386e8c65e75aa6e99696f7bf7b22d9
parentc3e5d7d02d06b56d411b1b58813d309532f5d257
HFP: remove the dropped HF connection request message in btif connect_queue and advance to the next scheduled connection request.

* hf connect-request message does not be handled in btif connect_queue when remote headset has already reconnected hfp, but it did not be removed, either.
it will make subsequent connecting request messsages blocked in btif connect_queue and never be handled.
* Add unit test for btif_profile_queue to verify the case when connect_cb() returns non BT_STATUS_SUCCESS

Bug: 140846154
Test: Connected 2 headset (HS1, HS2) -> Disable Bluetooth and Turn Off
HS2 ->  Enable Bluetooth and Turn On HS2 -> Check hfp and a2dp profole
state after HS2 connected

Change-Id: I503fba1975054efe3180ecf1f7daa917fb6edf99
btif/src/btif_profile_queue.cc
btif/test/btif_profile_queue_test.cc