summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2017-08-17 17:23:06 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2017-09-20 17:28:47 +0900
commit05c649064659d70adc90aad8ae50cbba134bfd72 (patch)
treef9db6f140b8cbb35799fc02d98d6302511a85d51 /src
parent9cfac27b551c378589cdbce8f14eba6d6c2c52b5 (diff)
downloadappcore-watch-05c649064659d70adc90aad8ae50cbba134bfd72.tar.gz
appcore-watch-05c649064659d70adc90aad8ae50cbba134bfd72.tar.bz2
appcore-watch-05c649064659d70adc90aad8ae50cbba134bfd72.zip
Set viewer visibility when start app
Change-Id: I02467606b40683fdc562ac2aac8187d4ccc50b69 Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/watch_app_main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/watch_app_main.c b/src/watch_app_main.c
index 8d5ff29..65e59cf 100755
--- a/src/watch_app_main.c
+++ b/src/watch_app_main.c
@@ -638,7 +638,10 @@ static void __on_ambient_changed(int ambient, void *data)
static void __on_window_show(int type, void *event, void *data)
{
appcore_efl_base_window_on_show(type, event);
- appcore_efl_base_resume();
+ if (__context.viewer_visibility == AUL_SCREEN_STATUS_RESUME)
+ appcore_efl_base_resume();
+ else
+ _D("viewer is not resumed, do not resume watch");
}
static void __on_window_visibility(int type, void *event, void *data)
@@ -755,6 +758,7 @@ EXPORT_API int watch_app_main(int argc, char **argv,
int width = 360;
int height = 360;
appcore_efl_base_ops ops = appcore_efl_base_get_default_ops();
+ char *viewer_visibility_str = NULL;
/* override methods */
ops.ui_base.base.create = __on_create;
@@ -769,6 +773,8 @@ EXPORT_API int watch_app_main(int argc, char **argv,
if (kb) {
bundle_get_str(kb, "WATCH_WIDTH", &width_str);
bundle_get_str(kb, "WATCH_HEIGHT", &height_str);
+ bundle_get_str(kb, "WATCH_VIEWER_VISIBILITY",
+ &viewer_visibility_str);
if (width_str)
width = atoi(width_str);
@@ -776,6 +782,11 @@ EXPORT_API int watch_app_main(int argc, char **argv,
if (height_str)
height = atoi(height_str);
+ if (viewer_visibility_str) {
+ __context.viewer_visibility =
+ atoi(viewer_visibility_str);
+ }
+
bundle_free(kb);
} else {
_E("failed to get launch argv");
@@ -811,7 +822,6 @@ EXPORT_API int watch_app_main(int argc, char **argv,
__context.callback = *callback;
__context.width = width;
__context.height = height;
- __context.viewer_visibility = AUL_SCREEN_STATUS_RESUME;
__context.watch_visibility = WVS_UNKNOWN;
__context.ambient_mode = false;
__context.ambient_mode_skip_resume = false;