Diff between f3b62cf14eb97f031d2e971309917115219e5dcf and 99be651b71208eb466f4c080f603ec7dabf62476

Changed Files

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

Full Patch

diff --git a/android/android-tester.c b/android/android-tester.c
index 6d2edc7..e7a8280 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -829,7 +829,7 @@ static void remote_setprop_disc_state_changed_cb(bt_discovery_state_t state)
 {
 	struct test_data *data = tester_get_data();
 
-	if (state == BT_DISCOVERY_STARTED && data->cb_count == 4) {
+	if (state == BT_DISCOVERY_STARTED && data->cb_count == 3) {
 		data->cb_count--;
 		return;
 	}
@@ -1002,13 +1002,15 @@ static void remote_setprop_device_found_cb(int num_properties,
 
 	bdaddr2android((const bdaddr_t *)bdaddr, &remote_addr.address);
 
-	if (data->cb_count == 3)
+	if (data->cb_count == 2)
 		data->cb_count--;
 
 	data->if_bluetooth->cancel_discovery();
 	status = data->if_bluetooth->set_remote_device_property(&remote_addr,
 									&prop);
 	check_expected_status(status);
+
+	status = data->if_bluetooth->get_remote_device_property(&remote_addr, prop.type);
 }
 
 static void remote_setprop_fail_device_found_cb(int num_properties,
@@ -1142,29 +1144,6 @@ static void remote_test_device_properties_cb(bt_status_t status,
 		check_expected_property(properties[i]);
 }
 
-static void remote_setprop_device_properties_cb(bt_status_t status,
-				bt_bdaddr_t *bd_addr, int num_properties,
-				bt_property_t *properties)
-{
-	int i;
-	struct test_data *data = tester_get_data();
-	const struct generic_data *test = data->test_data;
-	uint8_t *bdaddr = (uint8_t *)hciemu_get_client_bdaddr(data->hciemu);
-	bt_bdaddr_t remote_addr;
-	const bt_property_t prop = test->expected_properties[1].prop;
-
-	for (i = 0; i < num_properties; i++)
-		check_expected_property(properties[i]);
-
-	if (g_slist_length(data->expected_properties_list) == 1) {
-		bdaddr2android((const bdaddr_t *)bdaddr, &remote_addr.address);
-		data->cb_count--;
-		check_cb_count();
-		data->if_bluetooth->get_remote_device_property(&remote_addr,
-								prop.type);
-	}
-}
-
 static gboolean remote_device_properties(gpointer user_data)
 {
 	struct test_data *data = tester_get_data();
@@ -2214,11 +2193,6 @@ static struct priority_property remote_setprop_fname_props[] = {
 	.prop.val = &remote_setprop_fname_val,
 	.prop.len = sizeof(remote_setprop_fname_val) - 1,
 	},
-	{
-	.prop.type = BT_PROPERTY_REMOTE_FRIENDLY_NAME,
-	.prop.val = &remote_setprop_fname_val,
-	.prop.len = sizeof(remote_setprop_fname_val) - 1,
-	},
 };
 
 static const struct generic_data bt_dev_setprop_fname_success_test = {
@@ -2226,9 +2200,9 @@ static const struct generic_data bt_dev_setprop_fname_success_test = {
 					remote_setprop_disc_state_changed_cb,
 	.expected_hal_cb.device_found_cb = remote_setprop_device_found_cb,
 	.expected_hal_cb.remote_device_properties_cb =
-					remote_setprop_device_properties_cb,
-	.expected_cb_count = 4,
-	.expected_properties_num = 2,
+					remote_test_device_properties_cb,
+	.expected_cb_count = 3,
+	.expected_properties_num = 1,
 	.expected_properties = remote_setprop_fname_props,
 	.expected_adapter_status = BT_STATUS_SUCCESS,
 };