OSDN Git Service

bta_mce_sm_execute is never referenced
authorZach Johnson <zachoverflow@google.com>
Fri, 28 Aug 2020 22:55:12 +0000 (15:55 -0700)
committerZach Johnson <zachoverflow@google.com>
Fri, 28 Aug 2020 22:56:00 +0000 (15:56 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id6488edfe6466de7a9e2ab9d6a40259d5245b121

bta/mce/bta_mce_int.h
bta/mce/bta_mce_main.cc

index 4e1058f..7a7bf27 100644 (file)
@@ -78,8 +78,6 @@ extern tBTA_MCE_CB bta_mce_cb;
 /* config struct */
 extern tBTA_MCE_CFG* p_bta_mce_cfg;
 
-extern bool bta_mce_sm_execute(BT_HDR* p_msg);
-
 extern void bta_mce_enable(tBTA_MCE_MSG* p_data);
 extern void bta_mce_get_remote_mas_instances(tBTA_MCE_MSG* p_data);
 
index d2a2ca1..ad9d4e6 100644 (file)
  ****************************************************************************/
 
 tBTA_MCE_CB bta_mce_cb;
-
-/* state machine action enumeration list */
-#define BTA_MCE_NUM_ACTIONS (BTA_MCE_MAX_INT_EVT & 0x00ff)
-
-/* type for action functions */
-typedef void (*tBTA_MCE_ACTION)(tBTA_MCE_MSG* p_data);
-
-/* action function list */
-const tBTA_MCE_ACTION bta_mce_action[] = {
-    bta_mce_enable,                   /* BTA_MCE_API_ENABLE_EVT */
-    bta_mce_get_remote_mas_instances, /* BTA_MCE_API_GET_REMOTE_MAS_INSTANCES_EVT
-                                         */
-};
-
-/*******************************************************************************
- *
- * Function         bta_mce_sm_execute
- *
- * Description      State machine event handling function for MCE
- *
- *
- * Returns          void
- *
- ******************************************************************************/
-bool bta_mce_sm_execute(BT_HDR* p_msg) {
-  if (p_msg == NULL) return false;
-
-  bool ret = false;
-  uint16_t action = (p_msg->event & 0x00ff);
-
-  /* execute action functions */
-  if (action < BTA_MCE_NUM_ACTIONS) {
-    (*bta_mce_action[action])((tBTA_MCE_MSG*)p_msg);
-    ret = true;
-  }
-
-  return (ret);
-}