Adopt to execute app control with mime type
[platform/core/uifw/inputdelegator.git] / src / w-input-selector.cpp
index e22274d..8646781 100755 (executable)
@@ -1117,6 +1117,7 @@ void _app_service(app_control_h service, void* user_data)
 
        app_control_clone(&(app_data->source_app_control), service);
        app_data->reply_type = REPLY_APP_NORMAL;
+       app_data->mime_type = MIME_TYPE_ALL;
 
        ret = app_control_get_mime(service, &mime_type);
        if (ret != APP_CONTROL_ERROR_NONE) {
@@ -1125,13 +1126,21 @@ void _app_service(app_control_h service, void* user_data)
                if (mime_type) {
                        LOGD("mime type = %s", mime_type);
                        if (!strncmp(mime_type, "image/", strlen("image/"))) {
-
+                               app_data->mime_type = MIME_TYPE_IMAGE;
+                               app_data->app_type = APP_TYPE_DRAWING;
+                               launch_drawing_app((void *)app_data);
+                               if (mime_type)
+                                       free(mime_type);
+                               goto ACTIVATE;
                        } else if(!strncmp(mime_type, "audio/", strlen("audio/"))) {
+                               app_data->mime_type = MIME_TYPE_AUDIO;
                                app_data->app_type = APP_TYPE_STT;
                                _stt_clicked_cb((void *)app_data, NULL, NULL);
                                if (mime_type)
                                        free(mime_type);
                                goto ACTIVATE;
+                       } else if(!strncmp(mime_type, "text/", strlen("text/"))) {
+                               app_data->mime_type = MIME_TYPE_TEXT;
                        }
                }
        }