From 02ade334a99b8b80b2cba9aa7c25deb03f8acb09 Mon Sep 17 00:00:00 2001 From: Changwoo KIM Date: Thu, 28 Nov 2019 17:18:07 +0900 Subject: [PATCH] Change condition to call manual_render_start from AppControl Event & object move event Check LCD state. If it is Off do not resume watchface, skip manual render Change-Id: I457bc78234227e6960dbb0c62dd4bda122531412 Signed-off-by: hyunho --- watch-control/src/control.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/watch-control/src/control.c b/watch-control/src/control.c index 32a50277..3cd37644 100644 --- a/watch-control/src/control.c +++ b/watch-control/src/control.c @@ -167,10 +167,8 @@ static void __manual_render_start(bool force_resume) __manual_render.started = true; if (force_resume) { - if (__lcd_is_on()) { - _W("Force resume watchface"); - watch_manager_notify_resumed_status_of_viewer(); - } + _W("Force resume watchface"); + watch_manager_notify_resumed_status_of_viewer(); } } @@ -188,11 +186,10 @@ static void __manual_render_stop(void) static void __aul_watch_control_cb(bundle *b, void *user_data) { - bool v = __watch_is_visible(); - - if (!v) - return; - __manual_render_start(true); + if (__lcd_is_on()) { + _I("App control manual render"); + __manual_render_start(true); + } } static gboolean __force_resume_cb(gpointer data) @@ -204,12 +201,16 @@ static gboolean __force_resume_cb(gpointer data) static void __obj_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { - bool v = __watch_is_visible(); - - if (!v) - return; - __manual_render_start(true); - g_idle_add(__force_resume_cb, NULL); + if (__watch_is_visible() && __lcd_is_on()) { + _I("Move manual render"); + /* + If force_resume is true, it will make resume status for Viewer/Watchface both. + If force_resume is false, it will resume Watchface only when Viewer is on resume status. + Viewer can move watch object on background. So just pass false, leave Viewer decide resume status of watchface + */ + __manual_render_start(false); + g_idle_add(__force_resume_cb, NULL); + } } static Eina_Bool __window_on_pre_visibility(void *data, int type, void *event) -- 2.34.1