From e54cf1ac0857e90fbd9d00b5d682b2b9332498d7 Mon Sep 17 00:00:00 2001 From: Chris Manton <cmanton@google.com> Date: Tue, 25 Aug 2020 12:18:17 -0700 Subject: [PATCH] Rework api ret val BTA_DmGetConnectionState Towards proper interfaces Bug: 163134718 Tag: #refactor Test: compile & verify basic functions working Change-Id: Icc9ad82c78c2ecc73ea167c3595f35a7fc1b09b9 --- system/bta/dm/bta_dm_api.cc | 2 +- system/bta/include/bta_api.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/bta/dm/bta_dm_api.cc b/system/bta/dm/bta_dm_api.cc index 33ffdc67840..b16df0c575b 100644 --- a/system/bta/dm/bta_dm_api.cc +++ b/system/bta/dm/bta_dm_api.cc @@ -308,7 +308,7 @@ void BTA_GetEirService(uint8_t* p_eir, size_t eir_len, * Returns 0 if the device is NOT connected. * ******************************************************************************/ -uint16_t BTA_DmGetConnectionState(const RawAddress& bd_addr) { +bool BTA_DmGetConnectionState(const RawAddress& bd_addr) { tBTA_DM_PEER_DEVICE* p_dev = bta_dm_find_peer_device(bd_addr); return (p_dev && p_dev->conn_state == BTA_DM_CONNECTED); } diff --git a/system/bta/include/bta_api.h b/system/bta/include/bta_api.h index e937dfea0ea..04a7499feae 100644 --- a/system/bta/include/bta_api.h +++ b/system/bta/include/bta_api.h @@ -1039,10 +1039,10 @@ extern void BTA_GetEirService(uint8_t* p_eir, size_t eir_len, * * Description Returns whether the remote device is currently connected. * - * Returns 0 if the device is NOT connected. + * Returns true if the device is NOT connected, false otherwise. * ******************************************************************************/ -extern uint16_t BTA_DmGetConnectionState(const RawAddress& bd_addr); +extern bool BTA_DmGetConnectionState(const RawAddress& bd_addr); /******************************************************************************* * -- GitLab