summaryrefslogtreecommitdiff
path: root/android/hal-gatt.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2014-11-05 11:53:35 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-11-05 19:52:51 +0100
commit5a1814ef0f42bac6ba402f083ce499085e18c759 (patch)
tree06d16ff948071aa0162505cd75dbca0df92ef038 /android/hal-gatt.c
parent19f8877af783231edda9de8d4b53c2da48d1b3cd (diff)
downloadbluez-5a1814ef0f42bac6ba402f083ce499085e18c759.tar.gz
android/gatt: Add support for new API
In new Android API client_if parameter is removed.
Diffstat (limited to 'android/hal-gatt.c')
-rw-r--r--android/hal-gatt.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/android/hal-gatt.c b/android/hal-gatt.c
index c563fe9e6..080852ab9 100644
--- a/android/hal-gatt.c
+++ b/android/hal-gatt.c
@@ -595,7 +595,7 @@ static bt_status_t unregister_client(int client_if)
sizeof(cmd), &cmd, NULL, NULL, NULL);
}
-static bt_status_t scan(int client_if, bool start)
+static bt_status_t scan_real(int client_if, bool start)
{
struct hal_cmd_gatt_client_scan cmd;
@@ -609,6 +609,18 @@ static bt_status_t scan(int client_if, bool start)
sizeof(cmd), &cmd, NULL, NULL, NULL);
}
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+static bt_status_t scan(bool start)
+{
+ return scan_real(0, start);
+}
+#else
+static bt_status_t scan(int client_if, bool start)
+{
+ return scan_real(client_if, start);
+}
+#endif
+
static bt_status_t connect(int client_if, const bt_bdaddr_t *bd_addr,
bool is_direct)
{