Bluetooth: Disable low power managerment on Hal->close() am: f60aeb4462

am: 886dcecc89

Change-Id: Ifc4f5a8f2f5c285ba02960ac591c453b9e91d7d8
This commit is contained in:
Andre Eisenbach
2017-02-08 05:01:42 +00:00
committed by android-build-merger

View File

@@ -277,7 +277,7 @@ bool VendorInterface::Open(InitializeCompleteCallback initialize_complete_cb,
[this](int fd) { OnDataReady(fd); });
// Initially, the power management is off.
lpm_wake_deasserted = false;
lpm_wake_deasserted = true;
// Start configuring the firmware
firmware_startup_timer_ = new FirmwareStartupTimer();
@@ -290,6 +290,9 @@ void VendorInterface::Close() {
fd_watcher_.StopWatchingFileDescriptor();
if (lib_interface_ != nullptr) {
bt_vendor_lpm_mode_t mode = BT_VND_LPM_DISABLE;
lib_interface_->op(BT_VND_OP_LPM_SET_MODE, &mode);
lib_interface_->op(BT_VND_OP_USERIAL_CLOSE, nullptr);
uart_fd_ = INVALID_FD;
int power_state = BT_VND_PWR_OFF;
@@ -352,9 +355,6 @@ void VendorInterface::OnFirmwareConfigured(uint8_t result) {
ALOGD("%s Calling StartLowPowerWatchdog()", __func__);
fd_watcher_.ConfigureTimeout(std::chrono::milliseconds(lpm_timeout_ms),
[this]() { OnTimeout(); });
bt_vendor_lpm_wake_state_t wakeState = BT_VND_LPM_WAKE_ASSERT;
lib_interface_->op(BT_VND_OP_LPM_WAKE_SET_STATE, &wakeState);
}
void VendorInterface::OnTimeout() {