mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-03 12:07:58 +00:00
Bluetooth: Power off after closing the UART
Bug: 36084266 Test: angler & marlin switch users (Toggle Bluetooth under load) Change-Id: I1e0c34e334d11b9dcf9df62cbde3d5556c537bd7
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user