Diff between 40cef67567ae92820520626bce05ec22aff9007b and d585279aaa8bea277b15e0bd177f841100525429

Changed Files

File Additions Deletions Status
android/android-tester.c +5 -0 modified

Full Patch

diff --git a/android/android-tester.c b/android/android-tester.c
index 5e60397..a259b56 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -109,6 +109,7 @@ struct test_data {
 	const void *test_data;
 	pid_t bluetoothd_pid;
 
+	struct hw_device_t *device;
 	const bt_interface_t *if_bluetooth;
 	const btsock_interface_t *if_sock;
 
@@ -838,6 +839,8 @@ static void setup(struct test_data *data)
 		return;
 	}
 
+	data->device = device;
+
 	data->if_bluetooth = ((bluetooth_device_t *)
 					device)->get_bluetooth_interface();
 	if (!data->if_bluetooth) {
@@ -882,6 +885,8 @@ static void teardown(const void *test_data)
 		data->if_bluetooth = NULL;
 	}
 
+	data->device->close(data->device);
+
 	if (data->bluetoothd_pid)
 		waitpid(data->bluetoothd_pid, NULL, 0);