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

Unified Diff: device/bluetooth/bluetooth_adapter_factory.cc

Issue 2841943003: bluetooth: Use BuildInfo to retrieve the Android version (Closed)
Patch Set: bluetooth: Use BuildInfo to retrieve the Android version Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_factory.cc
diff --git a/device/bluetooth/bluetooth_adapter_factory.cc b/device/bluetooth/bluetooth_adapter_factory.cc
index 8cf012837f6c30df79de98bb6fac291b8d53e636..21a121691e932db1954c630ebb9ed5a1490ee57e 100644
--- a/device/bluetooth/bluetooth_adapter_factory.cc
+++ b/device/bluetooth/bluetooth_adapter_factory.cc
@@ -19,6 +19,9 @@
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
+#if defined(ANDROID)
+#include "base/android/build_info.h"
+#endif
namespace device {
@@ -77,8 +80,9 @@ bool BluetoothAdapterFactory::IsLowEnergySupported() {
if (default_adapter.Get())
return true;
-#if defined(OS_ANDROID) && __ANDROID_API__ >= 23
- return true;
+#if defined(OS_ANDROID)
+ return base::android::BuildInfo::GetInstance()->sdk_int() >=
+ base::android::SDK_VERSION_MARSHMALLOW;
#elif defined(OS_WIN)
// Windows 8 supports Low Energy GATT operations but it does not support
// scanning, initiating connections and GATT Server. To keep the API
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698