int
mmi_manager_set_state(mmi_client *client, mmi_state state)
{
+ mmi_fusion_handle *fusion = NULL;
+
if (!client)
return -1;
LOGI("...");
+ fusion = modality_fusions_get_client_fusion(client);
+ if (!fusion)
+ {
+ LOGE("Failed to get fusion handle from client(%p)\n", client);
+ return 0;
+ }
+
+ if (state == modality_fusion_get_state(fusion))
+ {
+ LOGE("Given state equals to existing state(%d) of fusion !\n", state);
+ return 0;
+ }
+
+ if (state != modality_fusion_set_state(fusion, state))
+ {
+ LOGE("Failed to set state(%d) on fusion !\n", state);
+ return 0;
+ }
+
mmi_manager_event_state_change *ev = NULL;
ev = calloc(1, sizeof(mmi_manager_event_state_change));