diff options
Diffstat (limited to 'bta/dm')
-rw-r--r-- | bta/dm/bta_dm_act.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c index 5d80891..24ab3bf 100644 --- a/bta/dm/bta_dm_act.c +++ b/bta/dm/bta_dm_act.c @@ -3418,7 +3418,12 @@ static void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id, { if(p_dev) { - p_dev->conn_state = BTA_DM_CONNECTED; + /* Do not set to connected if we are in the middle of unpairing. When AV stream is + * started it fakes out a SYS_CONN_OPEN to potentially trigger a role switch command. + * But this should not be done if we are in the middle of unpairing. + */ + if (p_dev->conn_state != BTA_DM_UNPAIRING) + p_dev->conn_state = BTA_DM_CONNECTED; for(j=1; j<= p_bta_dm_rm_cfg[0].app_id; j++) { |