OSDN Git Service

Remove BTA_AV_WITH_AVCTP_AUTHORIZATION
authorZach Johnson <zachoverflow@google.com>
Wed, 19 Aug 2020 20:49:36 +0000 (13:49 -0700)
committerZach Johnson <zachoverflow@google.com>
Thu, 20 Aug 2020 07:21:59 +0000 (00:21 -0700)
It's always false.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I55953edf1676d347873262603ac207b6a1119512

bta/av/bta_av_main.cc
bta/include/bta_av_api.h

index 51c3cf6..6bd0b76 100644 (file)
@@ -577,13 +577,8 @@ static void bta_av_api_register(tBTA_AV_DATA* p_data) {
       if (bta_av_cb.features & (BTA_AV_FEAT_RCTG)) {
 /* register with no authorization; let AVDTP use authorization instead */
 #if (BTA_AR_INCLUDED == TRUE)
-#if (BTA_AV_WITH_AVCTP_AUTHORIZATION == TRUE)
         bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
                         BTA_SEC_AUTHENTICATE, BTA_ID_AV);
-#else
-        bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
-                        BTA_SEC_AUTHENTICATE, BTA_ID_AV);
-#endif
 
         /* For the Audio Sink role we support additional TG to support
          * absolute volume.
@@ -733,13 +728,8 @@ static void bta_av_api_register(tBTA_AV_DATA* p_data) {
         /* if TG is not supported, we need to register to AVCT now */
         if ((bta_av_cb.features & (BTA_AV_FEAT_RCTG)) == 0) {
 #if (BTA_AR_INCLUDED == TRUE)
-#if (BTA_AV_WITH_AVCTP_AUTHORIZATION == TRUE)
           bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
                           BTA_SEC_AUTHENTICATE, BTA_ID_AV);
-#else
-          bta_ar_reg_avct(p_bta_av_cfg->avrc_mtu, p_bta_av_cfg->avrc_br_mtu,
-                          BTA_SEC_AUTHENTICATE, BTA_ID_AV);
-#endif
 #endif
           bta_av_rc_create(&bta_av_cb, AVCT_ACP, 0, BTA_AV_NUM_LINKS + 1);
         }
index 8fcbcd5..4fbd72f 100644 (file)
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
-/* Set to TRUE if seperate authorization prompt desired for AVCTP besides A2DP
- * authorization */
-/* Typically FALSE when AVRCP is used in conjunction with A2DP */
-#ifndef BTA_AV_WITH_AVCTP_AUTHORIZATION
-#define BTA_AV_WITH_AVCTP_AUTHORIZATION FALSE
-#endif
 
 /* AV status values */
 #define BTA_AV_SUCCESS 0        /* successful operation */