From a6af77b734bb246dfbaecece1151363b14555d17 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Thu, 28 Sep 2017 09:49:37 +0900 Subject: [PATCH 01/16] Add lcov for widget restart logic - widget restart positive logic should be checked with manual tc Change-Id: Ia8b78b2f86806d07d07eddca60ed24d62d0a470f Signed-off-by: Hyunho Kang --- src/efl_base/widget_app_internal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/efl_base/widget_app_internal.c b/src/efl_base/widget_app_internal.c index 43de979..cbd7e4c 100644 --- a/src/efl_base/widget_app_internal.c +++ b/src/efl_base/widget_app_internal.c @@ -43,12 +43,14 @@ #define LOG_TAG "CAPI_WIDGET_APPLICATION" static char *__class_id; +/* LCOV_EXCL_START */ static void __inst_cb(const char *class_id, const char *id, appcore_multiwindow_base_instance_h cxt, void *data) { if (!__class_id) __class_id = strdup(class_id); } +/* LCOV_EXCL_STOP */ EXPORT_API int widget_app_restart(void) { -- 2.7.4 From 2da6a06230b1c591dded99c41712b62eb568b732 Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Thu, 28 Sep 2017 19:39:25 +0900 Subject: [PATCH 02/16] Release version 1.2.3 Changes: - Add lcov for widget restart logic - Fix static analysis issue Change-Id: I0a0418f8d242b92ee935dcfbef69e3828ebbd2a9 Signed-off-by: Junghoon Park --- packaging/appcore-widget.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/appcore-widget.spec b/packaging/appcore-widget.spec index 281a334..a93c404 100644 --- a/packaging/appcore-widget.spec +++ b/packaging/appcore-widget.spec @@ -1,6 +1,6 @@ Name: appcore-widget Summary: Widget Application -Version: 1.2.2 +Version: 1.2.3 Release: 1 Group: Application Framework/Libraries License: Apache-2.0 -- 2.7.4 From 67ec244a5728d5e3fbf47ea9a012b80cd59f7e4b Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Fri, 29 Sep 2017 11:09:45 +0900 Subject: [PATCH 03/16] Add missing requirement Change-Id: Iff39d0dc4db7f73274baa43adad54051dcab860a Signed-off-by: Hyunho Kang --- appcore-widget-base.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appcore-widget-base.pc.in b/appcore-widget-base.pc.in index 78de159..f2d3717 100644 --- a/appcore-widget-base.pc.in +++ b/appcore-widget-base.pc.in @@ -8,6 +8,6 @@ includedir=@INCLUDEDIR@ Name: appcore-widget-base Description: widget base library Version: @VERSION@ -Requires: aul dlog capi-appfw-app-common widget_service +Requires: aul dlog capi-appfw-app-common widget_service appcore-multiwindow Libs: -L${libdir} -lappcore-widget-base Cflags: -I${includedir} -I${includedir}/appfw -- 2.7.4 From c6a564124cc41fa41b9d79b40e082f98443ccb20 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Fri, 29 Sep 2017 11:57:56 +0900 Subject: [PATCH 04/16] Release version 1.2.4 Changes: - Add missing requirement Change-Id: Ia8552bf2ffb0e94707ad707ff8ce636d2b4cda38 Signed-off-by: Hyunho Kang --- packaging/appcore-widget.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/appcore-widget.spec b/packaging/appcore-widget.spec index a93c404..4eeb935 100644 --- a/packaging/appcore-widget.spec +++ b/packaging/appcore-widget.spec @@ -1,6 +1,6 @@ Name: appcore-widget Summary: Widget Application -Version: 1.2.3 +Version: 1.2.4 Release: 1 Group: Application Framework/Libraries License: Apache-2.0 -- 2.7.4 From 45f807bf3a812120e606026546f5f282fb17ac39 Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Tue, 10 Oct 2017 22:14:17 +0900 Subject: [PATCH 05/16] Fix crash issue - Wrong sequence of finishing classes Change-Id: Icc9b23762f1a274ee1e8c7b1612280d934fb4599 Signed-off-by: Junghoon Park --- src/base/widget_base.c | 3 +-- src/efl_base/widget_app.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/base/widget_base.c b/src/base/widget_base.c index 1843061..f37fa3f 100644 --- a/src/base/widget_base.c +++ b/src/base/widget_base.c @@ -1249,10 +1249,9 @@ static void __free_class(gpointer data) EXPORT_API void widget_base_fini(void) { + appcore_multiwindow_base_fini(); g_list_free_full(__context.classes, __free_class); __context.classes = NULL; - - appcore_multiwindow_base_fini(); } EXPORT_API int widget_base_context_window_bind( diff --git a/src/efl_base/widget_app.c b/src/efl_base/widget_app.c index 6197b31..83073b3 100644 --- a/src/efl_base/widget_app.c +++ b/src/efl_base/widget_app.c @@ -262,13 +262,13 @@ EXPORT_API int widget_app_main(int argc, char **argv, cb_info.user_data = user_data; r = widget_base_init(ops, argc, argv, &cb_info); + widget_base_fini(); + if (__class_data_list) { g_list_free_full(__class_data_list, free); __class_data_list = NULL; } - widget_base_fini(); - return r; } -- 2.7.4 From 26a2eef19d22dd81037d435deb184f3249e2c6bc Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Tue, 10 Oct 2017 16:48:20 +0900 Subject: [PATCH 06/16] Fix static analysis issue - Fix 'Dereference null return value' Change-Id: I5970c18cf171918ac141a812514904f9589f5de8 Signed-off-by: Junghoon Park --- src/base/widget_base.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/base/widget_base.c b/src/base/widget_base.c index f37fa3f..bf5de25 100644 --- a/src/base/widget_base.c +++ b/src/base/widget_base.c @@ -111,6 +111,12 @@ static gboolean __timeout_cb(gpointer user_data) const char *class_id; cxt = appcore_multiwindow_base_instance_find(data->id); + + if (!cxt) { + LOGE("Can't find the instance"); + return G_SOURCE_REMOVE; + } + if (appcore_multiwindow_base_instance_is_resumed(cxt)) { LOGD("Periodic update!"); class_id = appcore_multiwindow_base_instance_get_class_id(cxt); -- 2.7.4 From a0ef7a2254cdf2641ced4f39ee4a4d233c60ddf9 Mon Sep 17 00:00:00 2001 From: Junghoon Park Date: Wed, 11 Oct 2017 10:42:58 +0900 Subject: [PATCH 07/16] Release version 1.2.5 Changes: - Fix crash issue - Fix static analysis issue Change-Id: I772efd830d8152ad335def321ac90daa0274958c Signed-off-by: Junghoon Park --- packaging/appcore-widget.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/appcore-widget.spec b/packaging/appcore-widget.spec index 4eeb935..e6e1c24 100644 --- a/packaging/appcore-widget.spec +++ b/packaging/appcore-widget.spec @@ -1,6 +1,6 @@ Name: appcore-widget Summary: Widget Application -Version: 1.2.4 +Version: 1.2.5 Release: 1 Group: Application Framework/Libraries License: Apache-2.0 -- 2.7.4 From dc07be609e116af96fdd8fab1828b377ed6de41f Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Wed, 11 Oct 2017 19:03:20 +0900 Subject: [PATCH 08/16] Fix periodic update timer bug Change-Id: Ia37808dcbd8cacda6a6e495c6925294dbed9a6af Signed-off-by: Hyunho Kang --- src/base/widget_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/widget_base.c b/src/base/widget_base.c index bf5de25..171e37c 100644 --- a/src/base/widget_base.c +++ b/src/base/widget_base.c @@ -1393,7 +1393,8 @@ static void __multiwindow_instance_create( ret = bundle_get_byte(b, WIDGET_K_PERIOD, (void **)&period, &size); - if (ret == BUNDLE_ERROR_NONE) { + if (ret == BUNDLE_ERROR_NONE && *period > 0) { + LOGI("set periodic update timer (%lf)", *period); instance_data->period = *period; instance_data->periodic_timer = g_timeout_add_seconds( instance_data->period, -- 2.7.4 From b49206f05eaa639c47cf53d8375b5a869bd2fe22 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Thu, 12 Oct 2017 13:37:40 +0900 Subject: [PATCH 09/16] Release version 1.2.6 Changes: - Fix periodic update timer bug Change-Id: I61ebeceb9bd9814920c7a1f2fbd01f9005ead943 Signed-off-by: Hyunho Kang --- packaging/appcore-widget.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/appcore-widget.spec b/packaging/appcore-widget.spec index e6e1c24..9cdc748 100644 --- a/packaging/appcore-widget.spec +++ b/packaging/appcore-widget.spec @@ -1,6 +1,6 @@ Name: appcore-widget Summary: Widget Application -Version: 1.2.5 +Version: 1.2.6 Release: 1 Group: Application Framework/Libraries License: Apache-2.0 -- 2.7.4 From 5c759837056c3d5f878be0979176ed5f61d14ad9 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Fri, 13 Oct 2017 19:44:29 +0900 Subject: [PATCH 10/16] Send app status change signal using AMD https://review.tizen.org/gerrit/#/c/155525/ (appcore-widget) https://review.tizen.org/gerrit/#/c/155526/ (amd) https://review.tizen.org/gerrit/#/c/155527/ (aul-1) Change-Id: Icfa955a395015ccd32530ee1099275d67fb23067 Signed-off-by: Hyunho Kang --- src/base/widget_base.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/base/widget_base.c b/src/base/widget_base.c index 171e37c..c732576 100644 --- a/src/base/widget_base.c +++ b/src/base/widget_base.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1448,11 +1449,7 @@ static void __multiwindow_instance_resume( if (!__fg_signal) { LOGD("Send fg signal to resourceD"); - aul_send_app_status_change_signal(getpid(), - __appid, - __package_id, - STATUS_FOREGROUND, - APP_TYPE_WIDGET); + aul_widget_instance_change_status(class_id, STATUS_FOREGROUND); __fg_signal = true; } } @@ -1483,11 +1480,7 @@ static void __multiwindow_instance_pause( if (__fg_signal) { LOGD("Send bg signal to resourceD"); - aul_send_app_status_change_signal(getpid(), - __appid, - __package_id, - STATUS_BACKGROUND, - APP_TYPE_WIDGET); + aul_widget_instance_change_status(class_id, STATUS_BACKGROUND); __fg_signal = false; } } -- 2.7.4 From 78e2f4ade8d499255a24c2d4ced86943171cfb18 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Mon, 16 Oct 2017 12:21:22 +0900 Subject: [PATCH 11/16] Release version 1.2.7 Changes: - Send app status change signal using AMD Change-Id: I4b2051f246edc4ced99b18a2e82eff1326a1796b Signed-off-by: Hyunho Kang --- packaging/appcore-widget.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/appcore-widget.spec b/packaging/appcore-widget.spec index 9cdc748..ef1179e 100644 --- a/packaging/appcore-widget.spec +++ b/packaging/appcore-widget.spec @@ -1,6 +1,6 @@ Name: appcore-widget Summary: Widget Application -Version: 1.2.6 +Version: 1.2.7 Release: 1 Group: Application Framework/Libraries License: Apache-2.0 -- 2.7.4 From a448b7e66de28da8811f466f62b3651dfde4de7f Mon Sep 17 00:00:00 2001 From: Jiyoun Park Date: Wed, 10 Jan 2018 10:06:53 +0900 Subject: [PATCH 12/16] EFL_UPGRADE: remove ecore-wayland dependency Change-Id: I9978a6305ec66deb0396deaa680e709c4787d3de --- CMakeLists.txt | 2 +- include/widget_base.h | 2 +- packaging/appcore-widget.spec | 3 ++- src/base/widget_base.c | 6 +++--- src/efl_base/widget_app.c | 8 ++++---- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a665178..369fd82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ pkg_check_modules(pkg_widget_base REQUIRED vconf-internal-keys widget_service capi-system-info - ecore-wayland + ecore-wl2 capi-system-info screen_connector_provider appcore-multiwindow diff --git a/include/widget_base.h b/include/widget_base.h index 0358000..bf40ad3 100644 --- a/include/widget_base.h +++ b/include/widget_base.h @@ -113,7 +113,7 @@ void widget_base_fini(void); int widget_base_exit(void); int widget_base_context_window_bind( widget_base_instance_h instance_h, const char *id, - Ecore_Wl_Window *wl_win); + Ecore_Wl2_Window *wl_win); int widget_base_class_on_create(widget_base_instance_h instance_h, bundle *content, int w, int h); int widget_base_class_on_pause(widget_base_instance_h instance_h); diff --git a/packaging/appcore-widget.spec b/packaging/appcore-widget.spec index ef1179e..e96cfdc 100644 --- a/packaging/appcore-widget.spec +++ b/packaging/appcore-widget.spec @@ -15,7 +15,7 @@ BuildRequires: pkgconfig(appcore-common) BuildRequires: pkgconfig(capi-appfw-app-common) BuildRequires: pkgconfig(widget_service) BuildRequires: pkgconfig(capi-system-info) -BuildRequires: pkgconfig(ecore-wayland) +BuildRequires: pkgconfig(ecore-wl2) BuildRequires: pkgconfig(appcore-multiwindow) BuildRequires: pkgconfig(screen_connector_provider) BuildRequires: cmake @@ -54,6 +54,7 @@ widget application (development files) %setup -q %build +export CFLAGS+=" -DEFL_BETA_API_SUPPORT " MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} %__make %{?jobs:-j%jobs} diff --git a/src/base/widget_base.c b/src/base/widget_base.c index c732576..ce0f63b 100644 --- a/src/base/widget_base.c +++ b/src/base/widget_base.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -1263,11 +1263,11 @@ EXPORT_API void widget_base_fini(void) EXPORT_API int widget_base_context_window_bind( widget_base_instance_h instance_h, const char *id, - Ecore_Wl_Window *wl_win) + Ecore_Wl2_Window *wl_win) { struct wl_surface *surface; - surface = ecore_wl_window_surface_get(wl_win); + surface = ecore_wl2_window_surface_get(wl_win); if (surface == NULL) { LOGE("failed to get surface"); /* LCOV_EXCL_LINE */ return WIDGET_BASE_ERROR_FAULT; /* LCOV_EXCL_LINE */ diff --git a/src/efl_base/widget_app.c b/src/efl_base/widget_app.c index 83073b3..24dcb58 100644 --- a/src/efl_base/widget_app.c +++ b/src/efl_base/widget_app.c @@ -334,7 +334,7 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context, Evas_Object **win) { Evas_Object *ret_win = NULL; - Ecore_Wl_Window *wl_win; + Ecore_Wl2_Window *wl_win; struct instance_data *data; char buffer[256]; int rots[3] = {0}; @@ -361,13 +361,13 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context, elm_win_wm_rotation_preferred_rotation_set(ret_win, -1); elm_win_wm_rotation_available_rotations_set(ret_win, rots, 1); - wl_win = elm_win_wl_window_get(ret_win); + wl_win = ecore_evas_wayland2_window_get(ecore_evas_ecore_evas_get(evas_object_evas_get(ret_win))); if (wl_win == NULL) { _E("failed to get wayland window"); /* LCOV_EXCL_LINE */ goto fault; } - ecore_wl_window_class_name_set(wl_win, id); + ecore_wl2_window_class_set(wl_win, id); elm_win_aux_hint_add(ret_win, "wm.policy.win.user.geometry", "1"); widget_base_context_window_bind((widget_base_instance_h)context, id, wl_win); @@ -376,7 +376,7 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context, evas_object_data_set(ret_win, "___PLUGID", strdup(buffer)); evas_object_event_callback_add(ret_win, EVAS_CALLBACK_DEL, __win_del_cb, NULL); - win_id = ecore_wl_window_id_get(wl_win); + win_id = ecore_wl2_window_id_get(wl_win); _D("window created: %d", win_id); data = (struct instance_data *)widget_base_context_get_user_data( -- 2.7.4 From 2168dafea1aefdc4d584eb2262f832f7daa4142f Mon Sep 17 00:00:00 2001 From: hyunho Date: Mon, 19 Mar 2018 15:50:54 +0900 Subject: [PATCH 13/16] Release version 1.2.8 Changes: - EFL_UPGRADE: remove ecore-wayland dependency Change-Id: I6ed2f0db72c270d5376cd60502fb182903107d43 Signed-off-by: hyunho --- packaging/appcore-widget.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/appcore-widget.spec b/packaging/appcore-widget.spec index e96cfdc..0870772 100644 --- a/packaging/appcore-widget.spec +++ b/packaging/appcore-widget.spec @@ -1,6 +1,6 @@ Name: appcore-widget Summary: Widget Application -Version: 1.2.7 +Version: 1.2.8 Release: 1 Group: Application Framework/Libraries License: Apache-2.0 -- 2.7.4 From d7ec3f8b73f9d0784ba9201a6634a348e96f32f4 Mon Sep 17 00:00:00 2001 From: hyunho Date: Mon, 23 Apr 2018 13:56:54 +0900 Subject: [PATCH 14/16] Adds file logs Change-Id: I0508f0bd80d3e3f162c89b3c1d5a0983f41418ec Signed-off-by: hyunho --- src/efl_base/widget_app.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/efl_base/widget_app.c b/src/efl_base/widget_app.c index 24dcb58..9386044 100644 --- a/src/efl_base/widget_app.c +++ b/src/efl_base/widget_app.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -114,6 +115,8 @@ static int __class_create(widget_base_instance_h instance_h, bundle *content, ret = callback_data->callback.create( (widget_context_h)instance_h, content, w, h, callback_data->user_data); + aul_widget_write_log(LOG_TAG, "[%s:%d] ret : %d", + __FUNCTION__, __LINE__, ret); } return ret; } @@ -130,7 +133,9 @@ static int __class_destroy(widget_base_instance_h instance_h, if (callback_data && callback_data->callback.destroy) { ret = callback_data->callback.destroy( (widget_context_h)instance_h, - reason, content, callback_data->user_data); + reason, content, callback_data->user_data); + aul_widget_write_log(LOG_TAG, "[%s:%d] ret : %d", + __FUNCTION__, __LINE__, ret); } data = (struct instance_data *)widget_base_context_get_user_data(instance_h); @@ -189,6 +194,7 @@ static int __widget_app_create(void *data) return -1; } _D("widget app is created"); + aul_widget_write_log(LOG_TAG, "[%s:%d]", __FUNCTION__, __LINE__); return 0; } @@ -205,7 +211,7 @@ static int __widget_app_terminate(void *data) callback->terminate(cb_info->user_data); widget_base_on_terminate(); _D("widget app is terminated"); - + aul_widget_write_log(LOG_TAG, "[%s:%d]", __FUNCTION__, __LINE__); return 0; } -- 2.7.4 From 14fd8897dec33f47c0a95cf392fc0d95b77bf9ba Mon Sep 17 00:00:00 2001 From: hyunho Date: Tue, 24 Apr 2018 09:41:17 +0900 Subject: [PATCH 15/16] Release version 1.2.9 Changes: - Adds file logs Change-Id: Iffe1234c6a87d5620b39f7dd28d240555087bd0a Signed-off-by: hyunho --- packaging/appcore-widget.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/appcore-widget.spec b/packaging/appcore-widget.spec index 0870772..c2e385b 100644 --- a/packaging/appcore-widget.spec +++ b/packaging/appcore-widget.spec @@ -1,6 +1,6 @@ Name: appcore-widget Summary: Widget Application -Version: 1.2.8 +Version: 1.2.9 Release: 1 Group: Application Framework/Libraries License: Apache-2.0 -- 2.7.4 From 10f1f2760f2ecde2c5b63d155bc4dd03e391d532 Mon Sep 17 00:00:00 2001 From: hyunho Date: Thu, 3 May 2018 18:22:12 +0900 Subject: [PATCH 16/16] Add log for permanant exit Change-Id: I0f131aead474f70fa6f2931bf4da6305d51c1738 Signed-off-by: hyunho --- src/base/widget_base.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/base/widget_base.c b/src/base/widget_base.c index ce0f63b..e10fc17 100644 --- a/src/base/widget_base.c +++ b/src/base/widget_base.c @@ -776,9 +776,14 @@ static void __multiwindow_exit(void *data) EXPORT_API int widget_base_exit(void) { + int ret; + appcore_multiwindow_base_exit(); - if (appcore_multiwindow_base_instance_get_cnt() != 0 && __is_permanent) - aul_notify_exit(); + if (appcore_multiwindow_base_instance_get_cnt() != 0 && __is_permanent) { + ret = aul_notify_exit(); + aul_widget_write_log(LOG_TAG, "[%s:%d] permanent exit : %d", + __FUNCTION__, __LINE__, ret); + } return 0; } @@ -1525,7 +1530,7 @@ static void __multiwindow_instance_terminate( if (cls->ops.destroy) cls->ops.destroy(instance_h, reason, content_info, class_data); - LOGD("%s is destroyed %d", id, reason); + LOGW("%s is destroyed %d", id, reason); if (reason == WIDGET_BASE_DESTROY_TYPE_PERMANENT) { __is_permanent = true; event = WIDGET_INSTANCE_EVENT_DESTROY; -- 2.7.4