Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Unified Diff: device/bluetooth/bluetooth_adapter_android.cc

Issue 1610053005: bluetooth: android: Fix a couple of crashes when adapter is turned on/off. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on latest master Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698