Call ambient tick on ambient mode on 82/131682/1
authorHyunho Kang <hhstark.kang@samsung.com>
Tue, 30 May 2017 10:48:55 +0000 (19:48 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Tue, 30 May 2017 10:49:44 +0000 (19:49 +0900)
Change-Id: I393ad2312d9f3badf996187c267ef165c58960a4
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/appcore-watch.c

index 93dda9b..618c342 100755 (executable)
@@ -600,6 +600,7 @@ static void __vconf_cb(keynode_t *key, void *data)
        const char *name;
        struct watch_priv *watch_data = data;
        struct evt_ops *eo;
+       struct watch_time_s timeinfo;
 
        name = vconf_keynode_get_name(key);
        _ret_if(name == NULL);
@@ -615,6 +616,8 @@ static void __vconf_cb(keynode_t *key, void *data)
                                alarm_id = 0;
                        }
                        __set_ambient_tick_cb();
+                       __get_timeinfo(&timeinfo);
+                       priv.ops->ambient_tick(&timeinfo, priv.ops->data);
                }
 
                return;
@@ -1096,6 +1099,8 @@ static int __widget_resume(const char *id, void *data)
 /* LCOV_EXCL_START */
 static int __signal_alpm_handler(int ambient, void *data)
 {
+       struct watch_time_s timeinfo;
+
        _D("_signal_alpm_handler: ambient: %d, state: %d", ambient, priv.state);
 
        if (priv.ambient_mode == ambient) {
@@ -1115,8 +1120,11 @@ static int __signal_alpm_handler(int ambient, void *data)
                priv.ambient_mode = 1;
                __do_app(WE_AMBIENT, &priv, NULL);
 
-               if (priv.ops && priv.ops->ambient_tick)
+               if (priv.ops && priv.ops->ambient_tick) {
                        __set_ambient_tick_cb();
+                       __get_timeinfo(&timeinfo);
+                       priv.ops->ambient_tick(&timeinfo, priv.ops->data);
+               }
 
                /* Send a update done signal */
                _watch_core_send_alpm_update_done();