OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
193df81
)
Use local constant for service/low_energy_client
author
Chris Manton
<cmanton@google.com>
Fri, 28 Aug 2020 21:42:50 +0000
(14:42 -0700)
committer
Chris Manton
<cmanton@google.com>
Fri, 28 Aug 2020 23:49:05 +0000
(16:49 -0700)
PHY_LE_1M_MASK
Towards readable code
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6bdecd0a24181a62faab53ef64e85347af1215d0
service/low_energy_client.cc
patch
|
blob
|
history
diff --git
a/service/low_energy_client.cc
b/service/low_energy_client.cc
index
3eece2a
..
de26de9
100644
(file)
--- a/
service/low_energy_client.cc
+++ b/
service/low_energy_client.cc
@@
-27,6
+27,8
@@
using std::lock_guard;
using std::mutex;
+constexpr int kPhyLe1MbMask = 1;
+
namespace bluetooth {
// LowEnergyClient implementation
@@
-59,7
+61,7
@@
bool LowEnergyClient::Connect(const std::string& address, bool is_direct) {
bt_status_t status =
hal::BluetoothGattInterface::Get()->GetClientHALInterface()->connect(
- client_id_, bda, is_direct, BT_TRANSPORT_LE, false,
PHY_LE_1M_MASK
);
+ client_id_, bda, is_direct, BT_TRANSPORT_LE, false,
kPhyLe1MbMask
);
if (status != BT_STATUS_SUCCESS) {
LOG(ERROR) << "HAL call to connect failed";
return false;