Commit 27600066 authored by zork's avatar zork Committed by Commit bot

Clear the bluetooth discoverable bit when OOBE is finished on Remora.

BUG=427089

Review URL: https://codereview.chromium.org/681903002

Cr-Commit-Position: refs/heads/master@{#301543}
parent d2185020
...@@ -65,8 +65,13 @@ BluetoothHostPairingController::BluetoothHostPairingController() ...@@ -65,8 +65,13 @@ BluetoothHostPairingController::BluetoothHostPairingController()
} }
BluetoothHostPairingController::~BluetoothHostPairingController() { BluetoothHostPairingController::~BluetoothHostPairingController() {
if (adapter_.get()) if (adapter_.get()) {
if (adapter_->IsDiscoverable()) {
adapter_->SetDiscoverable(false, base::Closure(), base::Closure());
}
adapter_->RemoveObserver(this); adapter_->RemoveObserver(this);
adapter_ = NULL;
}
} }
void BluetoothHostPairingController::ChangeStage(Stage new_stage) { void BluetoothHostPairingController::ChangeStage(Stage new_stage) {
...@@ -282,7 +287,6 @@ void BluetoothHostPairingController::OnSetError() { ...@@ -282,7 +287,6 @@ void BluetoothHostPairingController::OnSetError() {
void BluetoothHostPairingController::OnAcceptError( void BluetoothHostPairingController::OnAcceptError(
const std::string& error_message) { const std::string& error_message) {
LOG(ERROR) << error_message; LOG(ERROR) << error_message;
Reset();
} }
void BluetoothHostPairingController::OnSendError( void BluetoothHostPairingController::OnSendError(
...@@ -294,7 +298,6 @@ void BluetoothHostPairingController::OnReceiveError( ...@@ -294,7 +298,6 @@ void BluetoothHostPairingController::OnReceiveError(
device::BluetoothSocket::ErrorReason reason, device::BluetoothSocket::ErrorReason reason,
const std::string& error_message) { const std::string& error_message) {
LOG(ERROR) << reason << ", " << error_message; LOG(ERROR) << reason << ", " << error_message;
Reset();
} }
void BluetoothHostPairingController::OnHostStatusMessage( void BluetoothHostPairingController::OnHostStatusMessage(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment