diff --git a/android/tester-bluetooth.c b/android/tester-bluetooth.c
index ea59a57..fd5837d 100644
--- a/android/tester-bluetooth.c
+++ b/android/tester-bluetooth.c
BT_DISCOVERY_STARTED),
ACTION_SUCCESS(bt_start_discovery_action, NULL),
),
+ TEST_CASE("Bluetooth BR/EDR Discovery Stop - Success",
+ ACTION_SUCCESS(bluetooth_enable_action, NULL),
+ CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
+ ACTION_SUCCESS(bt_start_discovery_action, NULL),
+ CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
+ BT_DISCOVERY_STARTED),
+ ACTION_SUCCESS(bt_cancel_discovery_action, NULL),
+ CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
+ BT_DISCOVERY_STOPPED),
+ ),
+ TEST_CASE("Bluetooth BR/EDR Discovery Stop - Done",
+ ACTION_SUCCESS(bluetooth_enable_action, NULL),
+ CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
+ ACTION_SUCCESS(bt_start_discovery_action, NULL),
+ CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
+ BT_DISCOVERY_STARTED),
+ ACTION_SUCCESS(bt_cancel_discovery_action, NULL),
+ CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
+ BT_DISCOVERY_STOPPED),
+ ACTION_SUCCESS(bt_start_discovery_action, NULL),
+ ),
};
struct queue *get_bluetooth_tests(void)
diff --git a/android/tester-main.c b/android/tester-main.c
index eb588d1..7e2cc09 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
verify_step(&step, NULL);
}
+void bt_cancel_discovery_action(void)
+{
+ struct test_data *data = tester_get_data();
+ struct step step;
+
+ memset(&step, 0, sizeof(step));
+ step.action_result.status = data->if_bluetooth->cancel_discovery();
+
+ verify_step(&step, NULL);
+}
+
static void generic_test_function(const void *test_data)
{
struct test_data *data = tester_get_data();
diff --git a/android/tester-main.h b/android/tester-main.h
index 9e40907..1e1dd51 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
void bt_set_property_action(void);
void bt_get_property_action(void);
void bt_start_discovery_action(void);
+void bt_cancel_discovery_action(void);