Remove pause timer 84/233384/2
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 14 May 2020 08:04:01 +0000 (17:04 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Thu, 14 May 2020 23:56:16 +0000 (23:56 +0000)
Change-Id: I21d528349f64ab931d87d3a8d72eaaba05c7de66
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/base/watch_base.c

index b27c85a..4a91cbb 100755 (executable)
@@ -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);
        }
 }