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

Commit 5efcdc20 authored by Luis Hector Chavez's avatar Luis Hector Chavez
Browse files

Revert "bt: Update libchrome APIS to r456626."

This reverts commit 371b8d3d.

Reason for revert: Broke the mac_sdk
Exempt-From-Owner-Approval: Fixing mac_sdk

Change-Id: I11652839faf8430a7ee6ad64af0a7bd6985478e8
parent 371b8d3d
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -330,9 +330,9 @@ class AdapterImpl : public Adapter, public hal::BluetoothInterface::Observer {
    }

    lock_guard<mutex> lock(observers_lock_);
    for (auto& observer : observers_) {
      observer.OnDeviceConnectionStateChanged(this, device_address, connected);
    }
    FOR_EACH_OBSERVER(
        Adapter::Observer, observers_,
        OnDeviceConnectionStateChanged(this, device_address, connected));
  }

  // Sends a request to set the given HAL adapter property type and value.
@@ -362,9 +362,8 @@ class AdapterImpl : public Adapter, public hal::BluetoothInterface::Observer {
    if (prev_state == new_state) return;

    lock_guard<mutex> lock(observers_lock_);
    for (auto& observer : observers_) {
      observer.OnAdapterStateChanged(this, prev_state, new_state);
    }
    FOR_EACH_OBSERVER(Adapter::Observer, observers_,
                      OnAdapterStateChanged(this, prev_state, new_state));
  }

 private:
+1 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
#include <memory>

#include <base/logging.h>
#include <base/run_loop.h>

#include "service/adapter.h"
#include "service/hal/bluetooth_gatt_interface.h"
@@ -45,7 +44,7 @@ class DaemonImpl : public Daemon, public ipc::IPCManager::Delegate {
    CleanUpBluetoothStack();
  }

  void StartMainLoop() override { base::RunLoop().Run(); }
  void StartMainLoop() override { message_loop_->Run(); }

  Settings* GetSettings() const override { return settings_.get(); }

+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ int main(int argc, char* argv[]) {
  // received in dedicated threads set up by the ProcessState::startThreadPool
  // call above but we use this main loop for sending out heart rate
  // notifications.
  base::RunLoop().Run();
  main_loop.Run();

  LOG(INFO) << "Exiting";
  return EXIT_SUCCESS;
+6 −3
Original line number Diff line number Diff line
@@ -59,13 +59,16 @@ base::ObserverList<BluetoothGattInterface::ServerObserver>*
GetServerObservers();

#define FOR_EACH_SCANNER_OBSERVER(func)                      \
  for (auto& observer : *GetScannerObservers()) { observer.func; }
  FOR_EACH_OBSERVER(BluetoothGattInterface::ScannerObserver, \
                    *GetScannerObservers(), func)

#define FOR_EACH_CLIENT_OBSERVER(func)                      \
  for (auto& observer : *GetClientObservers()) { observer.func; }
  FOR_EACH_OBSERVER(BluetoothGattInterface::ClientObserver, \
                    *GetClientObservers(), func)

#define FOR_EACH_SERVER_OBSERVER(func)                      \
  for (auto& observer : *GetServerObservers()) { observer.func; }
  FOR_EACH_OBSERVER(BluetoothGattInterface::ServerObserver, \
                    *GetServerObservers(), func)

#define VERIFY_INTERFACE_OR_RETURN()                                   \
  do {                                                                 \
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ shared_mutex_impl g_instance_lock;
base::ObserverList<BluetoothInterface::Observer>* GetObservers();

#define FOR_EACH_BLUETOOTH_OBSERVER(func) \
  for (auto& observer : *GetObservers()) { observer.func; }
  FOR_EACH_OBSERVER(BluetoothInterface::Observer, *GetObservers(), func)

#define VERIFY_INTERFACE_OR_RETURN()                                   \
  do {                                                                 \
Loading