Fix PAN and AV role switch war
Bug: 23740164
Change-Id: Ib26a64b624c711443201adc4fde6b041ecb0dde1
diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c
index eb49637..5230d8f 100644
--- a/bta/dm/bta_dm_act.c
+++ b/bta/dm/bta_dm_act.c
@@ -3689,7 +3689,8 @@
versions are stored in a blacklist and role switch with these devices are
delayed to avoid the collision with link encryption setup */
- if (delay_role_switch == FALSE)
+ if (bta_dm_cb.device_list.peer_device[i].pref_role != BTA_SLAVE_ROLE_ONLY &&
+ delay_role_switch == FALSE)
{
BTM_SwitchRole (bta_dm_cb.device_list.peer_device[i].peer_bdaddr,
HCI_ROLE_MASTER, NULL);