Diff between f7b799f5c072722d276c3bb053fc02e5e0a39fca and be0e4f04cb2d9e024474e6a0d68c36c638e8312d

Changed Files

File Additions Deletions Status
android/bluetooth.c +7 -7 modified

Full Patch

diff --git a/android/bluetooth.c b/android/bluetooth.c
index 7d678ba..2bc79e2 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
@@ -1031,7 +1031,7 @@ static void clear_device_found(gpointer data, gpointer user_data)
 	dev->found = false;
 }
 
-static uint8_t get_adapter_discovering_type(void)
+static uint8_t get_supported_discovery_type(void)
 {
 	uint8_t type = SCAN_TYPE_NONE;
 
@@ -1048,7 +1048,7 @@ static bool start_discovery(uint8_t type)
 {
 	struct mgmt_cp_start_discovery cp;
 
-	cp.type = get_adapter_discovering_type() & type;
+	cp.type = get_supported_discovery_type() & type;
 
 	DBG("type=0x%x", cp.type);
 
@@ -1074,14 +1074,14 @@ static void check_discovery_state(uint8_t new_type, uint8_t old_type)
 
 	DBG("%u %u", new_type, old_type);
 
-	if (new_type == get_adapter_discovering_type()) {
+	if (new_type == get_supported_discovery_type()) {
 		g_slist_foreach(bonded_devices, clear_device_found, NULL);
 		g_slist_foreach(cached_devices, clear_device_found, NULL);
 		ev.state = HAL_DISCOVERY_STATE_STARTED;
 		goto done;
 	}
 
-	if (old_type != get_adapter_discovering_type())
+	if (old_type != get_supported_discovery_type())
 		return;
 
 	ev.state = HAL_DISCOVERY_STATE_STOPPED;
@@ -2908,7 +2908,7 @@ static bool stop_discovery(uint8_t type)
 {
 	struct mgmt_cp_stop_discovery cp;
 
-	cp.type = get_adapter_discovering_type() & type;
+	cp.type = get_supported_discovery_type() & type;
 
 	DBG("type=0x%x", cp.type);
 
@@ -3777,7 +3777,7 @@ static void handle_start_discovery_cmd(const void *buf, uint16_t len)
 
 		break;
 	case SCAN_TYPE_LE:
-		if (get_adapter_discovering_type() == SCAN_TYPE_LE)
+		if (get_supported_discovery_type() == SCAN_TYPE_LE)
 			break;
 
 		if (!stop_discovery(SCAN_TYPE_LE)) {
@@ -3809,7 +3809,7 @@ static void handle_cancel_discovery_cmd(const void *buf, uint16_t len)
 	case SCAN_TYPE_NONE:
 		break;
 	case SCAN_TYPE_LE:
-		if (get_adapter_discovering_type() != SCAN_TYPE_LE)
+		if (get_supported_discovery_type() != SCAN_TYPE_LE)
 			break;
 
 		if (gatt_device_found_cb) {