diff options
| author | Myles Watson <mylesgw@google.com> | 2017-03-10 09:10:51 -0800 |
|---|---|---|
| committer | Myles Watson <mylesgw@google.com> | 2017-03-10 09:27:23 -0800 |
| commit | 66a4ca3c928c08f2aa96a5ba1b60e93fa156d26c (patch) | |
| tree | 83369c352afd8176a757c48a8329bf4d7e79ec18 /bluetooth | |
| parent | cdca05557df85742a8fe7e15b8d78cd60b6a5986 (diff) | |
| download | android_hardware_interfaces-66a4ca3c928c08f2aa96a5ba1b60e93fa156d26c.tar.gz android_hardware_interfaces-66a4ca3c928c08f2aa96a5ba1b60e93fa156d26c.tar.bz2 android_hardware_interfaces-66a4ca3c928c08f2aa96a5ba1b60e93fa156d26c.zip | |
Bluetooth: Power off after closing the UART
Bug: 36084266
Test: angler & marlin switch users (Toggle Bluetooth under load)
Change-Id: I1e0c34e334d11b9dcf9df62cbde3d5556c537bd7
Diffstat (limited to 'bluetooth')
| -rw-r--r-- | bluetooth/1.0/default/vendor_interface.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc index 2576ecacf..a6507dd0d 100644 --- a/bluetooth/1.0/default/vendor_interface.cc +++ b/bluetooth/1.0/default/vendor_interface.cc @@ -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) { |
