From: sungwook79.park Date: Mon, 10 Jul 2017 08:16:25 +0000 (+0900) Subject: Support various MIME type to caller X-Git-Tag: accepted/tizen/4.0/unified/20170816.012804~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Finputdelegator.git;a=commitdiff_plain;h=5649745a562278dbf3d69a5e9438b057d4810c79 Support various MIME type to caller Change-Id: Icc91f888f5d03f488ab9cd685ef066ba0904be19 Signed-off-by: sungwook79.park --- diff --git a/org.tizen.inputdelegator.xml b/org.tizen.inputdelegator.xml index 41f8f2e..ccb38de 100755 --- a/org.tizen.inputdelegator.xml +++ b/org.tizen.inputdelegator.xml @@ -7,6 +7,9 @@ + + + diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index ed22ea2..e22274d 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -1113,10 +1113,31 @@ void _app_service(app_control_h service, void* user_data) char **input_type_array = NULL; int input_type_array_len = -1; bool is_extra_data_array = false; + char *mime_type = NULL; app_control_clone(&(app_data->source_app_control), service); app_data->reply_type = REPLY_APP_NORMAL; + ret = app_control_get_mime(service, &mime_type); + if (ret != APP_CONTROL_ERROR_NONE) { + LOGD("Fail to get mime type : %d", ret); + } else { + if (mime_type) { + LOGD("mime type = %s", mime_type); + if (!strncmp(mime_type, "image/", strlen("image/"))) { + + } else if(!strncmp(mime_type, "audio/", strlen("audio/"))) { + app_data->app_type = APP_TYPE_STT; + _stt_clicked_cb((void *)app_data, NULL, NULL); + if (mime_type) + free(mime_type); + goto ACTIVATE; + } + } + } + if (mime_type) + free(mime_type); + if (_TV || _MOBILE) { app_data->app_type = APP_TYPE_KEYBOARD; input_keyboard_init(service);