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

Commit a62b176c authored by Myles Watson's avatar Myles Watson Committed by android-build-merger
Browse files

Bluetooth: Power off after closing the UART

am: 66a4ca3c

Change-Id: Iccea3216281ddb5e6ccd608d9743c49dca21293a
parents 3b815eee 66a4ca3c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -273,9 +273,6 @@ void VendorInterface::Close() {
  if (lib_interface_ != nullptr) {
    bt_vendor_lpm_mode_t mode = BT_VND_LPM_DISABLE;
    lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);

    int power_state = BT_VND_PWR_OFF;
    lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state);
  }

  fd_watcher_.StopWatchingFileDescriptors();
@@ -287,6 +284,9 @@ void VendorInterface::Close() {

  if (lib_interface_ != nullptr) {
    lib_interface_->op(BT_VND_OP_USERIAL_CLOSE, nullptr);

    int power_state = BT_VND_PWR_OFF;
    lib_interface_->op(BT_VND_OP_POWER_CTRL, &power_state);
  }

  if (lib_handle_ != nullptr) {