Set state variable before calling OnTimeTick function 90/234790/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 28 May 2020 22:41:23 +0000 (07:41 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 28 May 2020 22:41:23 +0000 (07:41 +0900)
Change-Id: Id288577ac084c1f5a16f3d6af0e3185934d5a2ed
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/base/watch_base.c

index dc365b2..4068d3b 100755 (executable)
@@ -721,6 +721,8 @@ static int __on_ui_base_resume(void *data)
        if (__state != WS_PAUSED && __state != WS_CREATED)
                return APP_ERROR_NONE;
 
+       __state = WS_RUNNING;
+
        if (!watch_tick) {
                __time_tick_cb(data);
        } else {
@@ -731,8 +733,6 @@ static int __on_ui_base_resume(void *data)
        if (__context.callback.resume)
                __context.callback.resume(__context.data);
 
-       __state = WS_RUNNING;
-
        if (!watch_tick) {
                __time_tick_cb(data);
        } else {