Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06cb9582 authored by Mattias Agren's avatar Mattias Agren Committed by Andre Eisenbach
Browse files

Reduce persistence on aquiring master role

Whenever a device has more than 1 ACL link active and transferring
data on one of its links via PAN, HH or JV (RFCOMM) the sys busy/idle
state toggles frequently. To avoid triggering role switches for each
of these events we filter this out and let the other SYS events handle
it in combination with other role policy management code. Ideally we
should revert the toggling to properly reflect the busy/idle state of
each profile but to limit risk of side effects at this stage we will
make this intermittent change.

This also affects audio streaming in certain cases.

Bug: 24570959, 25129209
Change-Id: I141e17ee069c82624e153fd8de5db90ae93724b9
parent 65587bcf
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -3511,7 +3511,6 @@ static void bta_dm_disable_conn_down_timer_cback (TIMER_LIST_ENT *p_tle)
*******************************************************************************/
static void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id, BD_ADDR peer_addr)
{

    UINT8 j;
    tBTA_PREF_ROLES role;
    tBTA_DM_PEER_DEVICE *p_dev;
@@ -3565,6 +3564,10 @@ static void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, UINT8 id, UINT8 app_id,
        APPL_TRACE_WARNING("bta_dm_rm_cback:%d, status:%d", bta_dm_cb.cur_av_count, status);
    }

    /* Don't adjust roles for each busy/idle state transition to avoid
       excessive switch requests when individual profile busy/idle status
       changes */
    if ((status != BTA_SYS_CONN_BUSY) && (status != BTA_SYS_CONN_IDLE))
        bta_dm_adjust_roles(FALSE);
}