OSDN Git Service

Clean up unused defines and imports
authorHansong Zhang <hsz@google.com>
Fri, 25 Sep 2020 21:57:49 +0000 (14:57 -0700)
committerHansong Zhang <hsz@google.com>
Sat, 26 Sep 2020 01:06:40 +0000 (18:06 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5c47ee320085664b3db68ff4a5860aa931d1376d

stack/avct/avct_l2c.cc
stack/avct/avct_l2c_br.cc
stack/avdt/avdt_l2c.cc
stack/bnep/bnep_main.cc
stack/gap/gap_conn.cc
stack/gatt/gatt_main.cc
stack/hid/hidd_conn.cc
stack/hid/hidh_conn.cc
stack/sdp/sdp_main.cc

index bd549a2..0b03751 100644 (file)
  *
  ******************************************************************************/
 
-#include <string.h>
 #include "avct_api.h"
 #include "avct_int.h"
 #include "bt_target.h"
 #include "bt_types.h"
-#include "bt_utils.h"
 #include "l2c_api.h"
 #include "l2cdefs.h"
 #include "osi/include/osi.h"
 
-/* Configuration flags. */
-#define AVCT_L2C_CFG_IND_DONE (1 << 0)
-#define AVCT_L2C_CFG_CFM_DONE (1 << 1)
-
 /* callback function declarations */
 void avct_l2c_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                 uint16_t psm, uint8_t id);
index b0cae5d..cfc64e1 100644 (file)
  *
  *****************************************************************************/
 
-#include <string.h>
 #include "avct_api.h"
 #include "avct_int.h"
 #include "bt_target.h"
-#include "bt_utils.h"
 #include "l2c_api.h"
 #include "l2cdefs.h"
 #include "osi/include/osi.h"
 
-/* Configuration flags. */
-#define AVCT_L2C_CFG_IND_DONE (1 << 0)
-#define AVCT_L2C_CFG_CFM_DONE (1 << 1)
-
 /* callback function declarations */
 void avct_l2c_br_connect_ind_cback(const RawAddress& bd_addr, uint16_t lcid,
                                    uint16_t psm, uint8_t id);
index e9304aa..9eec402 100644 (file)
  *
  ******************************************************************************/
 
-#include <string.h>
-#include "avdt_api.h"
 #include "avdt_int.h"
 #include "bt_target.h"
 #include "bt_types.h"
 #include "bta/include/bta_av_api.h"
 #include "btm_api.h"
-#include "btm_int.h"
 #include "device/include/interop.h"
 #include "l2c_api.h"
 #include "l2cdefs.h"
index 50c9efb..f72f11c 100644 (file)
  *
  ******************************************************************************/
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 #include "bt_target.h"
 
 #include "bt_common.h"
 #include "bt_types.h"
-#include "hcidefs.h"
-#include "hcimsgs.h"
 
 #include "l2c_api.h"
 #include "l2cdefs.h"
 #include "log/log.h"
 
 #include "btm_api.h"
-#include "btu.h"
 
 #include "bnep_api.h"
 #include "bnep_int.h"
-#include "bt_utils.h"
 
 #include "bta/include/bta_api.h"
 #include "device/include/controller.h"
index cdcef5c..fab07dc 100644 (file)
@@ -35,7 +35,6 @@ typedef struct {
 #define GAP_CCB_STATE_LISTENING 1
 #define GAP_CCB_STATE_CONN_SETUP 2
 #define GAP_CCB_STATE_CFG_SETUP 3
-#define GAP_CCB_STATE_WAIT_SEC 4
 #define GAP_CCB_STATE_CONNECTED 5
   uint8_t con_state;
 
index cee7c0e..38ae8bf 100644 (file)
 
 using base::StringPrintf;
 
-/* Configuration flags. */
-#define GATT_L2C_CFG_IND_DONE (1 << 0)
-#define GATT_L2C_CFG_CFM_DONE (1 << 1)
-
-/* minimum GATT MTU size over BR/EDR link
- */
-#define GATT_MIN_BR_MTU_SIZE 48
-
 /******************************************************************************/
 /*            L O C A L    F U N C T I O N     P R O T O T Y P E S            */
 /******************************************************************************/
@@ -660,8 +652,7 @@ void gatt_l2cif_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) {
   if (!p_tcb) return;
 
   /* GATT uses the smaller of our MTU and peer's MTU  */
-  if (p_cfg->mtu_present &&
-      (p_cfg->mtu >= GATT_MIN_BR_MTU_SIZE && p_cfg->mtu < L2CAP_DEFAULT_MTU))
+  if (p_cfg->mtu_present && p_cfg->mtu < L2CAP_DEFAULT_MTU)
     p_tcb->payload_size = p_cfg->mtu;
   else
     p_tcb->payload_size = L2CAP_DEFAULT_MTU;
index 8183154..a5c0025 100644 (file)
@@ -23,8 +23,6 @@
  *
  ******************************************************************************/
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 
 #include "bt_types.h"
 #include "l2c_api.h"
 #include "l2cdefs.h"
 
-#include "btm_api.h"
-#include "btm_int.h"
-#include "btu.h"
-
 #include "hiddefs.h"
 
-#include "bt_utils.h"
 #include "hidd_api.h"
 #include "hidd_int.h"
 
index a6f53d9..acecb90 100644 (file)
@@ -22,8 +22,6 @@
  *
  ******************************************************************************/
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 
 #include "bt_common.h"
 #include "l2c_api.h"
 #include "l2cdefs.h"
 
-#include "btm_api.h"
-#include "btm_int.h"
-#include "btu.h"
-
 #include "hiddefs.h"
 
-#include "bt_utils.h"
 #include "hidh_api.h"
 #include "hidh_int.h"
 
index 8921a98..f706d53 100644 (file)
@@ -32,8 +32,6 @@
 #include "l2cdefs.h"
 #include "osi/include/osi.h"
 
-#include "btm_api.h"
-
 #include "sdp_api.h"
 #include "sdpint.h"
 #include "stack/btm/btm_sec.h"