Diff between 5eaf3a88f34de10c5756375cb0efaa8ff81eea74 and 043251a8bca898c87bc043d51bf12fe0ba4acf25

Changed Files

File Additions Deletions Status
android/adapter.c +9 -3 modified

Full Patch

diff --git a/android/adapter.c b/android/adapter.c
index 7baf356..c7e97d4 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -629,21 +629,21 @@ static uint8_t set_scan_mode(void *buf, uint16_t len)
 	switch (*mode) {
 	case HAL_ADAPTER_SCAN_MODE_NONE:
 		if (!cur_conn && !cur_disc)
-			return HAL_STATUS_DONE;
+			goto done;
 
 		conn = false;
 		disc = false;
 		break;
 	case HAL_ADAPTER_SCAN_MODE_CONN:
 		if (cur_conn && !cur_disc)
-			return HAL_STATUS_DONE;
+			goto done;
 
 		conn = true;
 		disc = false;
 		break;
 	case HAL_ADAPTER_SCAN_MODE_CONN_DISC:
 		if (cur_conn && cur_disc)
-			return HAL_STATUS_DONE;
+			goto done;
 
 		conn = true;
 		disc = true;
@@ -663,6 +663,12 @@ static uint8_t set_scan_mode(void *buf, uint16_t len)
 	}
 
 	return HAL_STATUS_SUCCESS;
+
+done:
+	/* Android expects property changed callback */
+	scan_mode_changed();
+
+	return HAL_STATUS_DONE;
 }
 
 static uint8_t set_property(void *buf, uint16_t len)