OSDN Git Service

Bluetooth: Fix DUT cannot ccnnect remote headset BT off/ON
authorjuncao <juncao@codeaurora.org>
Mon, 25 Apr 2016 06:58:54 +0000 (14:58 +0800)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 6 Sep 2016 06:46:24 +0000 (23:46 -0700)
commit42073b04b2048a9c11ea450179d24a4e2edb3255
tree8d379a2320505dca58b8cc938e2d9f39c243b08a
parentcf31c9eb620de3a7f4ef5e1d6a4e3416faa853d2
Bluetooth: Fix DUT cannot ccnnect remote headset BT off/ON

When DUT try to connect a paired power-off headset, there is
no ACL connection at all. Then do BT off, the av sm is still
opening,it will not move to idle and clear the connection
request in the btif layer. At the same time if the Adpater
service is not unbinded during BT off, the btif-queue will
not tear down. Next time BT on, the last connection request
is actully invalid but its state is still busy in the
connection list, then it will block the new connection
request from up layer. The fix will set the sm back to idle
and remove the ongoing connnecton request if sm is opening
state before BT off.

CRs-Fixed: 1008846
Change-Id: Id953cb811107d1cc0ccaa3683027d61fdfa90fb9
btif/src/btif_av.c