Diff between 5073903c34fc9b0efb04907c7fd72038c8a5de07 and abb07abb4bb18ad44ade126703a3d0f15b4657b5

Changed Files

File Additions Deletions Status
android/health.c +15 -0 modified

Full Patch

diff --git a/android/health.c b/android/health.c
index c603288..1d2396d 100644
--- a/android/health.c
+++ b/android/health.c
@@ -105,6 +105,19 @@ static void free_health_app(void *data)
 	free(app);
 }
 
+static void send_app_reg_notify(struct health_app *app, uint8_t state)
+{
+	struct hal_ev_health_app_reg_state ev;
+
+	DBG("");
+
+	ev.id = app->id;
+	ev.state = state;
+
+	ipc_send_notif(hal_ipc, HAL_SERVICE_ID_HEALTH,
+				HAL_EV_HEALTH_APP_REG_STATE, sizeof(ev), &ev);
+}
+
 static bool mdep_by_mdep_role(const void *data, const void *user_data)
 {
 	const struct mdep_cfg *mdep = data;
@@ -687,6 +700,8 @@ static void bt_health_mdep_cfg_data(const void *buf, uint16_t len)
 		goto fail;
 	}
 
+	send_app_reg_notify(app, HAL_HEALTH_APP_REG_SUCCESS);
+
 send_rsp:
 	ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_HEALTH, HAL_OP_HEALTH_MDEP,
 							HAL_STATUS_SUCCESS);