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

Commit aeae74ce authored by AnubhavGupta's avatar AnubhavGupta Committed by Ajay Panicker
Browse files

Open acceptor channel for RC on cleanup

Usecase:
1. Install Fitbit app
2. Pair and connect with RD1
3. Start streaming
4. Pair and connect Fitbit watch

Failure:
No Stable Avctp connection with Fitbit Watch after pairing

Rootcause:
If there will be no listening acceptor
then some Remotes unable to connect AVRC
connection upon remote restart.

Fix:
Open acceptor channel for RC on cleanup
as if there will be no listening acceptor
then some Remotes unable to connect AVRC
connection upon remote restart.

Test: 1. Install Fitbit app
2. Pair and connect with RD1
3. Start streaming
4. Pair and connect Fitbit watch

Fixes: 63605621
Change-Id: Ia6cefc29ca64b00f2f5fe2f9816d71604c511415
parent 483217bf
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1878,11 +1878,6 @@ void bta_av_rc_closed(tBTA_AV_DATA* p_data) {
      } else {
        /* AVCT CCB is still there. dealloc */
        bta_av_del_rc(p_rcb);

        /* if the AVRCP is no longer listening, create the listening channel */
        if (bta_av_cb.rc_acp_handle == BTA_AV_RC_HANDLE_NONE &&
            bta_av_cb.features & BTA_AV_FEAT_RCTG)
          bta_av_rc_create(&bta_av_cb, AVCT_ACP, 0, BTA_AV_NUM_LINKS + 1);
      }
    } else if ((p_rcb->handle != BTA_AV_RC_HANDLE_NONE) &&
               (p_rcb->status & BTA_AV_RC_CONN_MASK)) {
@@ -1903,6 +1898,9 @@ void bta_av_rc_closed(tBTA_AV_DATA* p_data) {
  tBTA_AV bta_av_data;
  bta_av_data.rc_close = rc_close;
  (*p_cb->p_cback)(BTA_AV_RC_CLOSE_EVT, &bta_av_data);
  if (bta_av_cb.rc_acp_handle == BTA_AV_RC_HANDLE_NONE
                  && bta_av_cb.features & BTA_AV_FEAT_RCTG)
      bta_av_rc_create(&bta_av_cb, AVCT_ACP, 0, BTA_AV_NUM_LINKS + 1);
}

/*******************************************************************************