OSDN Git Service

A2DP: Advance btif profile queue on OPENING->other_state transition
authorJack He <siyuanh@google.com>
Mon, 2 Oct 2017 21:07:33 +0000 (14:07 -0700)
committerJack He <siyuanh@google.com>
Thu, 5 Oct 2017 09:45:19 +0000 (02:45 -0700)
commit1a2ea0fb6b430074e90bf957b0c3c8e00c77004a
tree20fc66fbab8030b8031a61622b224cb2c315af44
parentab6fcc863ec741378192a81dbb4e12219ba9e493
A2DP: Advance btif profile queue on OPENING->other_state transition

* Entering BTIF_AV_STATE_OPENING is only possible through
  BTIF_AV_CONNECT_REQ_EVT (initiated by us) OR
  BTA_AV_PENDING_EVT (initiated by remote)
  from BTIF_AV_STATE_IDLE
* If we go from BTIF_AV_CONNECT_REQ_EVT, we must have a pending
  connection request in btif_profile_queue that should be advanced when
  we quit BTIF_AV_STATE_OPENING state
* This CL adds a flag to indicate whether an AV connection is initiated
  by us and only advance queue when it is
* Also add queue advancement in BTA_AV_REJECT_EVT and BTA_AV_CLOSE_EVT

Bug: 67317954
Test: make
Change-Id: I16dc8ebf76c6edaacb1f7a4a44e604170ff9a8b0
(cherry picked from commit a3626477587e99347dcf966087497e9a1c4732a4)
btif/src/btif_av.cc