From f271188f07528e23a9f7de59870c8646dbc9b44d Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Thu, 14 May 2020 17:04:01 +0900 Subject: [PATCH] Remove pause timer Change-Id: I21d528349f64ab931d87d3a8d72eaaba05c7de66 Signed-off-by: Hwankyu Jhun --- src/base/watch_base.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/base/watch_base.c b/src/base/watch_base.c index b27c85a..4a91cbb 100755 --- a/src/base/watch_base.c +++ b/src/base/watch_base.c @@ -111,7 +111,6 @@ struct watch_base_context { bool ambient_mode; bool ambient_mode_skip_resume; bool bg_launch; - guint pause_timer; aul_app_com_connection_h conn; bundle *extra; void *data; @@ -804,32 +803,6 @@ static void __on_window_show(int type, void *event, void *data) } } -static gboolean __delayed_pause(gpointer data) -{ - LOGW("Delayed pause"); - __on_ui_base_pause(NULL); - __context.pause_timer = 0; - return G_SOURCE_REMOVE; -} - -static void __add_pause_timer(void) -{ - if (__context.pause_timer == 0) { - _D("Add pause timer"); - __context.pause_timer = g_timeout_add(200, - __delayed_pause, NULL); - } -} - -static void __remove_pause_timer(void) -{ - if (__context.pause_timer) { - _D("Remove pause timer"); - g_source_remove(__context.pause_timer); - __context.pause_timer = 0; - } -} - static void __on_window_visibility(int type, void *event, void *data) { Ecore_Wl2_Event_Window_Visibility_Change *ev = event; @@ -839,11 +812,10 @@ static void __on_window_visibility(int type, void *event, void *data) if (ev->fully_obscured) { __context.watch_visibility = WVS_PAUSE; - __add_pause_timer(); + __on_ui_base_pause(NULL); } else { __context.watch_visibility = WVS_RESUME; __context.bg_launch = false; - __remove_pause_timer(); __on_ui_base_resume(NULL); } } -- 2.7.4