Revert "Bluetooth: Don't disable LPM at power off" am: 8a9efb6e35

am: 4bae5b7775

Change-Id: Ic1f2c365234f29b9b30b899055759057aba38ec8
This commit is contained in:
Andre Eisenbach
2017-03-17 20:42:11 +00:00
committed by android-build-merger

View File

@@ -265,6 +265,13 @@ bool VendorInterface::Open(InitializeCompleteCallback initialize_complete_cb,
}
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();
if (hci_ != nullptr) {