Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 086caa2d authored by Chris Manton's avatar Chris Manton
Browse files

Use local constant for service/low_energy_client

PHY_LE_1M_MASK

Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6bdecd0a24181a62faab53ef64e85347af1215d0
parent 53ca8ae3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;