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

Commit af5b837f authored by Andre Eisenbach's avatar Andre Eisenbach Committed by android-build-merger
Browse files

Revert "Bluetooth: Don't disable LPM at power off" am: 8a9efb6e am: 4bae5b77

am: 7218e043

Change-Id: Iaf2dbc49d4741c4cf37a51601c0b21b3bd7a81a1
parents 8d35ec30 7218e043
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -265,6 +265,13 @@ bool VendorInterface::Open(InitializeCompleteCallback initialize_complete_cb,
}
}


void VendorInterface::Close() {
void VendorInterface::Close() {
  // These callbacks may send HCI events (vendor-dependent), so make sure to
  // StopWatching the file descriptor after this.
  if (lib_interface_ != nullptr) {
    bt_vendor_lpm_mode_t mode = BT_VND_LPM_DISABLE;
    lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
  }

  fd_watcher_.StopWatchingFileDescriptors();
  fd_watcher_.StopWatchingFileDescriptors();


  if (hci_ != nullptr) {
  if (hci_ != nullptr) {