Index: device/bluetooth/bluetooth_adapter_android.cc |
diff --git a/device/bluetooth/bluetooth_adapter_android.cc b/device/bluetooth/bluetooth_adapter_android.cc |
index 144ad520b2aa91d468e8e890749fbdbe1b4f00ce..00cead7ddef0537243a8304a4a8114566633ad83 100644 |
--- a/device/bluetooth/bluetooth_adapter_android.cc |
+++ b/device/bluetooth/bluetooth_adapter_android.cc |
@@ -77,7 +77,12 @@ bool BluetoothAdapterAndroid::IsPowered() const { |
void BluetoothAdapterAndroid::SetPowered(bool powered, |
const base::Closure& callback, |
const ErrorCallback& error_callback) { |
- NOTIMPLEMENTED(); |
+ if (Java_ChromeBluetoothAdapter_setPowered(AttachCurrentThread(), |
+ j_adapter_.obj(), powered)) { |
+ callback.Run(); |
+ } else { |
+ error_callback.Run(); |
+ } |
} |
bool BluetoothAdapterAndroid::IsDiscoverable() const { |