From: nazib.ullah Date: Tue, 28 Jun 2016 07:05:31 +0000 (+0600) Subject: [TBT][tizen_3.0_mobile][operation-pick issue resolved] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F80%2F76980%2F1;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][tizen_3.0_mobile][operation-pick issue resolved] Change-Id: Ib1b695a458f2ea00b75825a20a4d352b92a345c6 --- diff --git a/operationpickviewapp/inc/operationpickviewapp.h b/operationpickviewapp/inc/operationpickviewapp.h index 0922e6e..b8f0643 100644 --- a/operationpickviewapp/inc/operationpickviewapp.h +++ b/operationpickviewapp/inc/operationpickviewapp.h @@ -33,7 +33,7 @@ #include #include #include -#include +//#include #include #ifdef LOG_TAG diff --git a/operationpickviewapp/src/filemanager-util.c b/operationpickviewapp/src/filemanager-util.c index ea55043..bacf667 100644 --- a/operationpickviewapp/src/filemanager-util.c +++ b/operationpickviewapp/src/filemanager-util.c @@ -131,14 +131,17 @@ void filemanager_utils_get_file_list_of_type(const char *dir_path, Eina_List **f if ((strcmp(dir->d_name, ".")) && (strcmp(dir->d_name, ".."))) { filemanager_utils_get_file_category(dir->d_name, &(ad->type)); - if(file_type!=NULL){ - if(ad->type == file_type){ - //DBG("FILES: %s",dir->d_name); - *file_list = eina_list_append(*file_list, dir->d_name); + if(file_type) + { + if(ad->type == file_type) + { + DBG("FILES: %s",dir->d_name); + *file_list = eina_list_append(*file_list, strdup(dir->d_name)); } } - else if(ad->type == FILE_TYPE_IMAGE || ad->type == FILE_TYPE_MUSIC || ad->type == FILE_TYPE_VIDEO){ - *file_list = eina_list_append(*file_list, dir->d_name); + else if(ad->type == FILE_TYPE_IMAGE || ad->type == FILE_TYPE_MUSIC || ad->type == FILE_TYPE_VIDEO) + { + *file_list = eina_list_append(*file_list, strdup(dir->d_name)); } } diff --git a/operationpickviewapp/src/operationpickviewapp.c b/operationpickviewapp/src/operationpickviewapp.c index 03d4f40..f096b38 100644 --- a/operationpickviewapp/src/operationpickviewapp.c +++ b/operationpickviewapp/src/operationpickviewapp.c @@ -130,11 +130,13 @@ static inline const char *get_storage_video_dir_path() static void win_delete_request_cb(void *data, Evas_Object *obj, void *event_info) { + DBG("win_delete_request_cb"); ui_app_exit(); } static void layout_back_cb(void *data, Evas_Object *obj, void *event_info) { + DBG("layout_back_cb"); appdata_s *ad = data; /* Let window go to hide state. */ if(!strcmp(ad->mime, "video/3gpp") || @@ -150,6 +152,7 @@ static void layout_back_cb(void *data, Evas_Object *obj, void *event_info) destroy_sound_player(ad->sound_player_data); } elm_win_lower(ad->win); + ui_app_exit(); } static void app_get_resource(const char *edj_file_in, char *edj_path_out, int edj_path_max) @@ -451,8 +454,9 @@ Eina_List* get_image_dir_image_file_list(void* data) Eina_List* file_list = NULL; char *app_id; char *shared_res_path; - app_control_get_caller (ad->app_control, &app_id); - //DBG("app_id%s", app_id); + //app_control_get_caller (ad->app_control, &app_id); + app_control_get_extra_data(ad->app_control, "app_id", &app_id); + DBG("app_id: %s", app_id); app_manager_get_shared_resource_path(app_id, &shared_res_path); //DBG("shared_path%s", shared_res_path); //strcat(shared_res_path, "images/"); @@ -469,7 +473,8 @@ Eina_List* get_audio_dir_audio_file_list(void* data) Eina_List* file_list = NULL; char *app_id; char *shared_res_path; - app_control_get_caller (ad->app_control, &app_id); +// app_control_get_caller (ad->app_control, &app_id); + app_control_get_extra_data(ad->app_control, "app_id", &app_id); //DBG("app_id%s", app_id); app_manager_get_shared_resource_path(app_id, &shared_res_path); //DBG("shared_path%s", shared_res_path); @@ -482,12 +487,13 @@ Eina_List* get_audio_dir_audio_file_list(void* data) Eina_List* get_all_dir_file_list(void* data) { - DBG("get_audio_dir_audio_file_list"); + DBG("get_all_dir_file_list"); appdata_s *ad =(appdata_s*) data; Eina_List* file_list = NULL; char *app_id; char *shared_res_path; - app_control_get_caller (ad->app_control, &app_id); +// app_control_get_caller (ad->app_control, &app_id); + app_control_get_extra_data(ad->app_control, "app_id", &app_id); //DBG("app_id%s", app_id); app_manager_get_shared_resource_path(app_id, &shared_res_path); //DBG("shared_path%s", shared_res_path); @@ -505,7 +511,8 @@ Eina_List* get_video_dir_video_file_list(void* data) Eina_List* file_list = NULL; char *app_id; char *shared_res_path; - app_control_get_caller (ad->app_control, &app_id); +// app_control_get_caller (ad->app_control, &app_id); + app_control_get_extra_data(ad->app_control, "app_id", &app_id); DBG("app_id%s", app_id); app_manager_get_shared_resource_path(app_id, &shared_res_path); DBG("shared_path%s", shared_res_path); @@ -661,12 +668,12 @@ static void show_url(void* data) DBG("show_url....."); appdata_s *this = (appdata_s*) data; - Evas_Object *web_view = ewk_view_add (evas_object_evas_get(this->layout)); + //Evas_Object *web_view = ewk_view_add (evas_object_evas_get(this->layout)); - ewk_view_url_set(web_view, "http://www.google.com"); //TODO: this url will change according to data + //ewk_view_url_set(web_view, "http://www.google.com"); //TODO: this url will change according to data - evas_object_show(web_view); - elm_object_part_content_set(this->layout, "data_view", web_view); + //evas_object_show(web_view); + //elm_object_part_content_set(this->layout, "data_view", web_view); } diff --git a/release/binary-armv7l/org.tizen.operationpickviewapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.operationpickviewapp-1.0.0-arm.tpk index 2c91933..c7da30f 100644 Binary files a/release/binary-armv7l/org.tizen.operationpickviewapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.operationpickviewapp-1.0.0-arm.tpk differ diff --git a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk index f3a5a58..d928263 100644 Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/org.tizen.operationpickviewapp-1.0.0-i386.tpk b/release/binary-x86/org.tizen.operationpickviewapp-1.0.0-i386.tpk index 4ee27e5..8052d37 100644 Binary files a/release/binary-x86/org.tizen.operationpickviewapp-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.operationpickviewapp-1.0.0-i386.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk index 948c9fc..32dd169 100644 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk differ diff --git a/tbtcoreapp/src/view/tbt-pick-view.c b/tbtcoreapp/src/view/tbt-pick-view.c index 2c91480..f3d04a2 100644 --- a/tbtcoreapp/src/view/tbt-pick-view.c +++ b/tbtcoreapp/src/view/tbt-pick-view.c @@ -559,6 +559,9 @@ static void _view(void *data, Evas_Object *obj, void *event_info) } ret = app_control_set_uri(this->service, _view_it->uri); RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_set_uri failed :%s", get_app_control_error(ret)); + + + ret = app_control_send_launch_request(this->service , app_control_view_cb, this); RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_send_launch_request failed :%s", get_app_control_error(ret)); } @@ -577,6 +580,14 @@ static void _view(void *data, Evas_Object *obj, void *event_info) ret = app_control_set_mime(this-> service, _view_it->mime); RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_set_mime failed :%s", get_app_control_error(ret)); } + + char* app_id; + app_get_id(&app_id); + DBG("app_id: %s", app_id); + + ret = app_control_add_extra_data(this->service, "app_id", app_id); + RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_add_extra_data failed :%s", get_app_control_error(ret)); + ret = app_control_send_launch_request(this->service , app_control_view_cb, this); RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_send_launch_request failed :%s", get_app_control_error(ret));