From: sungwook79.park Date: Fri, 9 Mar 2018 05:38:55 +0000 (+0900) Subject: Fix the issue that have not callback protocol with sketch when inputdelegator starts... X-Git-Tag: accepted/tizen/4.0/unified/20180330.122344~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Finputdelegator.git;a=commitdiff_plain;h=67d81325dbc09f20b09d770d81e66b24cc057b89 Fix the issue that have not callback protocol with sketch when inputdelegator starts with mime type and back key are pressed Change-Id: I09fee8b223d3ef27c5e139f710fdcef98b0d99ef Signed-off-by: sungwook79.park --- diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index f729ed0..e08d777 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -43,6 +43,8 @@ InputKeyboardData g_input_keyboard_data; InputTypeData g_input_type_data; InputTemplateData g_input_template_data; +static bool g_set_mimetype_in_app_service = false; +static bool g_set_mimetype_in_app_resume = false; static Elm_Object_Item *it_empty; static Elm_Object_Item *it_title; @@ -1344,6 +1346,8 @@ void _app_service(app_control_h service, void* user_data) g_input_template_data.input_template_array = user_template_array; g_input_template_data.input_template_array_len = user_template_array_len; + g_set_mimetype_in_app_service = false; + ret = app_control_get_mime(service, &mime_type); if (ret != APP_CONTROL_ERROR_NONE) { LOGD("Fail to get mime type : %d", ret); @@ -1353,6 +1357,7 @@ void _app_service(app_control_h service, void* user_data) if (!strncmp(mime_type, "image/", strlen("image/"))) { app_data->mime_type = MIME_TYPE_IMAGE; app_data->app_type = APP_TYPE_DRAWING; + g_set_mimetype_in_app_service = true; launch_drawing_app((void *)app_data); if (mime_type) free(mime_type); @@ -1360,6 +1365,7 @@ void _app_service(app_control_h service, void* user_data) } else if (!strncmp(mime_type, "audio/", strlen("audio/"))) { app_data->mime_type = MIME_TYPE_AUDIO; app_data->app_type = APP_TYPE_STT; + g_set_mimetype_in_app_service = true; _stt_clicked_cb((void *)app_data, NULL, NULL); if (mime_type) free(mime_type); @@ -1448,6 +1454,16 @@ void _app_resume(void* user_data) { PRINTFUNC(DLOG_DEBUG, ""); resume_voice(); + + if (g_set_mimetype_in_app_resume) { + app_control_destroy(app_data->source_app_control); + app_data->source_app_control = NULL; + ui_app_exit(); + } + + if (g_set_mimetype_in_app_service) { + g_set_mimetype_in_app_resume = true; + } } void _app_terminate(void* user_data)