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: submit/tizen/20180329.023339~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=442f9e62bee5804767757cc24cb97adc4ba8033c;p=platform%2Fcore%2Fuifw%2Finputdelegator.git 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 808891e..5c990a2 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; @@ -1343,6 +1345,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); @@ -1352,6 +1356,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); @@ -1359,6 +1364,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); @@ -1446,6 +1452,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)