Loading system/bta/ar/bta_ar.cc +2 −22 Original line number Diff line number Diff line Loading @@ -30,24 +30,6 @@ /* AV control block */ tBTA_AR_CB bta_ar_cb; /******************************************************************************* * * Function bta_ar_id * * Description This function maps sys_id to ar id mask. * * Returns void * ******************************************************************************/ static uint8_t bta_ar_id(tBTA_SYS_ID sys_id) { uint8_t mask = 0; if (sys_id == BTA_ID_AV) { mask = BTA_AR_AV_MASK; } return mask; } /******************************************************************************* * * Function bta_ar_init Loading Loading @@ -238,13 +220,11 @@ void bta_ar_reg_avrc(uint16_t service_uuid, const char* service_name, * Returns void * *****************************************************************************/ void bta_ar_dereg_avrc(uint16_t service_uuid, tBTA_SYS_ID sys_id) { uint8_t mask = bta_ar_id(sys_id); void bta_ar_dereg_avrc(uint16_t service_uuid) { uint8_t mask = BTA_AR_AV_MASK; uint16_t categories = 0; uint8_t temp[8], *p; if (!mask) return; if (service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET) { if (bta_ar_cb.sdp_tg_handle && mask == bta_ar_cb.tg_registered) { bta_ar_cb.tg_registered = 0; Loading system/bta/av/bta_av_act.cc +2 −2 Original line number Diff line number Diff line Loading @@ -2268,7 +2268,7 @@ void bta_av_dereg_comp(tBTA_AV_DATA* p_data) { /* remove the A2DP SDP record, if no more audio stream is left */ if (!p_cb->reg_audio) { bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL, BTA_ID_AV); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL); if (p_cb->sdp_a2dp_handle) { bta_av_del_sdp_rec(&p_cb->sdp_a2dp_handle); p_cb->sdp_a2dp_handle = 0; Loading @@ -2295,7 +2295,7 @@ void bta_av_dereg_comp(tBTA_AV_DATA* p_data) { bta_ar_dereg_avdt(BTA_ID_AV); /* deregister from AVCT */ bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET, BTA_ID_AV); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET); bta_ar_dereg_avct(); if (p_cb->disabling) { Loading system/bta/av/bta_av_main.cc +2 −2 Original line number Diff line number Diff line Loading @@ -243,8 +243,8 @@ static void bta_av_api_enable(tBTA_AV_DATA* p_data) { bta_ar_dereg_avdt(BTA_ID_AV); // deregister from AVCT bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL, BTA_ID_AV); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET, BTA_ID_AV); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET); bta_ar_dereg_avct(); } Loading system/bta/include/bta_ar_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -134,6 +134,6 @@ extern void bta_ar_reg_avrc(uint16_t service_uuid, const char* p_service_name, * Returns void * *****************************************************************************/ extern void bta_ar_dereg_avrc(uint16_t service_uuid, tBTA_SYS_ID sys_id); extern void bta_ar_dereg_avrc(uint16_t service_uuid); #endif /* BTA_AR_API_H */ Loading
system/bta/ar/bta_ar.cc +2 −22 Original line number Diff line number Diff line Loading @@ -30,24 +30,6 @@ /* AV control block */ tBTA_AR_CB bta_ar_cb; /******************************************************************************* * * Function bta_ar_id * * Description This function maps sys_id to ar id mask. * * Returns void * ******************************************************************************/ static uint8_t bta_ar_id(tBTA_SYS_ID sys_id) { uint8_t mask = 0; if (sys_id == BTA_ID_AV) { mask = BTA_AR_AV_MASK; } return mask; } /******************************************************************************* * * Function bta_ar_init Loading Loading @@ -238,13 +220,11 @@ void bta_ar_reg_avrc(uint16_t service_uuid, const char* service_name, * Returns void * *****************************************************************************/ void bta_ar_dereg_avrc(uint16_t service_uuid, tBTA_SYS_ID sys_id) { uint8_t mask = bta_ar_id(sys_id); void bta_ar_dereg_avrc(uint16_t service_uuid) { uint8_t mask = BTA_AR_AV_MASK; uint16_t categories = 0; uint8_t temp[8], *p; if (!mask) return; if (service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET) { if (bta_ar_cb.sdp_tg_handle && mask == bta_ar_cb.tg_registered) { bta_ar_cb.tg_registered = 0; Loading
system/bta/av/bta_av_act.cc +2 −2 Original line number Diff line number Diff line Loading @@ -2268,7 +2268,7 @@ void bta_av_dereg_comp(tBTA_AV_DATA* p_data) { /* remove the A2DP SDP record, if no more audio stream is left */ if (!p_cb->reg_audio) { bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL, BTA_ID_AV); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL); if (p_cb->sdp_a2dp_handle) { bta_av_del_sdp_rec(&p_cb->sdp_a2dp_handle); p_cb->sdp_a2dp_handle = 0; Loading @@ -2295,7 +2295,7 @@ void bta_av_dereg_comp(tBTA_AV_DATA* p_data) { bta_ar_dereg_avdt(BTA_ID_AV); /* deregister from AVCT */ bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET, BTA_ID_AV); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET); bta_ar_dereg_avct(); if (p_cb->disabling) { Loading
system/bta/av/bta_av_main.cc +2 −2 Original line number Diff line number Diff line Loading @@ -243,8 +243,8 @@ static void bta_av_api_enable(tBTA_AV_DATA* p_data) { bta_ar_dereg_avdt(BTA_ID_AV); // deregister from AVCT bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL, BTA_ID_AV); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET, BTA_ID_AV); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL); bta_ar_dereg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET); bta_ar_dereg_avct(); } Loading
system/bta/include/bta_ar_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -134,6 +134,6 @@ extern void bta_ar_reg_avrc(uint16_t service_uuid, const char* p_service_name, * Returns void * *****************************************************************************/ extern void bta_ar_dereg_avrc(uint16_t service_uuid, tBTA_SYS_ID sys_id); extern void bta_ar_dereg_avrc(uint16_t service_uuid); #endif /* BTA_AR_API_H */