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

Unified Diff: device/bluetooth/bluetooth_adapter_android.cc

Issue 1226103005: Revert of bluetooth: android: Initial Low Energy Discovery Sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-manifest-
Patch Set: Created 5 years, 5 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_android.h ('k') | device/bluetooth/bluetooth_adapter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_android.cc
diff --git a/device/bluetooth/bluetooth_adapter_android.cc b/device/bluetooth/bluetooth_adapter_android.cc
index 489050c005e34178f2e3256f2d6bd9cf7ff90d5b..4a7a15039dbf292b8e06e1c08dae4c57e57db0fb 100644
--- a/device/bluetooth/bluetooth_adapter_android.cc
+++ b/device/bluetooth/bluetooth_adapter_android.cc
@@ -31,8 +31,7 @@
BluetoothAdapterAndroid* adapter = new BluetoothAdapterAndroid();
adapter->j_adapter_.Reset(Java_ChromeBluetoothAdapter_create(
- AttachCurrentThread(), reinterpret_cast<intptr_t>(adapter),
- java_bluetooth_adapter_wrapper));
+ AttachCurrentThread(), java_bluetooth_adapter_wrapper));
return adapter->weak_ptr_factory_.GetWeakPtr();
}
@@ -127,49 +126,30 @@
error_callback.Run(BluetoothAdvertisement::ERROR_UNSUPPORTED_PLATFORM);
}
-void BluetoothAdapterAndroid::OnScanFailed(JNIEnv* env, jobject obj) {
- MarkDiscoverySessionsAsInactive();
-}
-
BluetoothAdapterAndroid::BluetoothAdapterAndroid() : weak_ptr_factory_(this) {
}
BluetoothAdapterAndroid::~BluetoothAdapterAndroid() {
- Java_ChromeBluetoothAdapter_onBluetoothAdapterAndroidDestruction(
- AttachCurrentThread(), j_adapter_.obj());
}
void BluetoothAdapterAndroid::AddDiscoverySession(
BluetoothDiscoveryFilter* discovery_filter,
const base::Closure& callback,
const ErrorCallback& error_callback) {
- // TODO(scheib): Support filters crbug.com/490401
- if (Java_ChromeBluetoothAdapter_addDiscoverySession(AttachCurrentThread(),
- j_adapter_.obj())) {
- callback.Run();
- } else {
- error_callback.Run();
- }
+ error_callback.Run();
}
void BluetoothAdapterAndroid::RemoveDiscoverySession(
BluetoothDiscoveryFilter* discovery_filter,
const base::Closure& callback,
const ErrorCallback& error_callback) {
- if (Java_ChromeBluetoothAdapter_removeDiscoverySession(AttachCurrentThread(),
- j_adapter_.obj())) {
- callback.Run();
- } else {
- error_callback.Run();
- }
+ error_callback.Run();
}
void BluetoothAdapterAndroid::SetDiscoveryFilter(
scoped_ptr<BluetoothDiscoveryFilter> discovery_filter,
const base::Closure& callback,
const ErrorCallback& error_callback) {
- // TODO(scheib): Support filters crbug.com/490401
- NOTIMPLEMENTED();
error_callback.Run();
}
« no previous file with comments | « device/bluetooth/bluetooth_adapter_android.h ('k') | device/bluetooth/bluetooth_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698