Call the callback after ambient mode changed 94/183194/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 3 Jul 2018 08:28:15 +0000 (17:28 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 3 Jul 2018 08:28:52 +0000 (17:28 +0900)
Change-Id: I91951ed555bce1879ba780f98e037521f6a8991a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/base/watch_base.c

index 60f3124..21cfb2e 100755 (executable)
@@ -358,6 +358,8 @@ static int __signal_alpm_handler(int ambient, void *data)
        if (ambient) {
                if (appcore_ui_base_is_resumed()) {
                        appcore_ui_base_on_pause();
+                       if (__context.callback.pause)
+                               __context.callback.pause(__context.data);
                        __context.ambient_mode_skip_resume = false;
                } else {
                        __context.ambient_mode_skip_resume = true;
@@ -383,6 +385,8 @@ static int __signal_alpm_handler(int ambient, void *data)
                if (!__context.ambient_mode_skip_resume) {
                        _D("Call the resume after ambient mode changed");
                        appcore_ui_base_resume();
+                       if (__context.callback.resume)
+                               __context.callback.resume(__context.data);
                }
 
                /* Disable alarm */