From 39c23bebdea07e2f51e5c41fcc6830c37872e876 Mon Sep 17 00:00:00 2001
From: Chris Manton <cmanton@google.com>
Date: Sun, 9 Aug 2020 17:06:06 -0700
Subject: [PATCH] Remove unnecessary type definition tBTA_DM_BLE_IDLE_TIME_MS

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I77fada83c97922c9dce234522b7ef01430e5d006
---
 system/bta/include/bta_api.h | 4 +---
 system/btif/src/btif_dm.cc   | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/system/bta/include/bta_api.h b/system/bta/include/bta_api.h
index 938b2986aae..b948f1ab392 100644
--- a/system/bta/include/bta_api.h
+++ b/system/bta/include/bta_api.h
@@ -731,8 +731,6 @@ typedef void(tBTA_DM_ENCRYPT_CBACK)(const RawAddress& bd_addr,
 #define BTA_DM_BLE_SEC_NO_MITM BTM_BLE_SEC_ENCRYPT_NO_MITM
 #define BTA_DM_BLE_SEC_MITM BTM_BLE_SEC_ENCRYPT_MITM
 
-typedef tBTM_BLE_IDLE_TIME_MS tBTA_DM_BLE_IDLE_TIME_MS;
-
 #define BTA_DM_CONTRL_UNKNOWN 0 /* Unknown state */
 #define BTA_DM_CONTRL_ACTIVE 1  /* ACL link on, SCO link ongoing, sniff mode */
 #define BTA_DM_CONTRL_SCAN                   \
@@ -751,7 +749,7 @@ typedef uint16_t tBTA_DM_BLE_ADV_INFO_TIMESTAMP;
 
 typedef void(tBTA_BLE_ENERGY_INFO_CBACK)(tBTM_BLE_TX_TIME_MS tx_time,
                                          tBTM_BLE_RX_TIME_MS rx_time,
-                                         tBTA_DM_BLE_IDLE_TIME_MS idle_time,
+                                         tBTM_BLE_IDLE_TIME_MS idle_time,
                                          tBTM_BLE_ENERGY_USED energy_used,
                                          tBTA_DM_CONTRL_STATE ctrl_state,
                                          tBTA_STATUS status);
diff --git a/system/btif/src/btif_dm.cc b/system/btif/src/btif_dm.cc
index 8c0cab8eaa6..55ff54fde4f 100644
--- a/system/btif/src/btif_dm.cc
+++ b/system/btif/src/btif_dm.cc
@@ -2168,7 +2168,7 @@ static void bte_dm_remote_service_record_evt(tBTA_DM_SEARCH_EVT event,
  ******************************************************************************/
 static void bta_energy_info_cb(tBTM_BLE_TX_TIME_MS tx_time,
                                tBTM_BLE_RX_TIME_MS rx_time,
-                               tBTA_DM_BLE_IDLE_TIME_MS idle_time,
+                               tBTM_BLE_IDLE_TIME_MS idle_time,
                                tBTM_BLE_ENERGY_USED energy_used,
                                tBTA_DM_CONTRL_STATE ctrl_state,
                                tBTA_STATUS status) {
-- 
GitLab