Send viewer visibility when launching watch app 17/144617/2 accepted/tizen/3.0/common/20170818.112414 accepted/tizen/3.0/ivi/20170818.001400 accepted/tizen/3.0/mobile/20170818.001327 accepted/tizen/3.0/tv/20170818.001312 accepted/tizen/3.0/wearable/20170818.001345 submit/tizen_3.0/20170817.090741
authorHyunho Kang <hhstark.kang@samsung.com>
Thu, 17 Aug 2017 08:24:50 +0000 (17:24 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Thu, 17 Aug 2017 09:02:53 +0000 (09:02 +0000)
Change-Id: Ia1325d2ba6d1766a80aeca456332d706f5579989
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
watch-control/src/control.c

index 2fb4bd0..4a12577 100644 (file)
@@ -75,7 +75,7 @@ static unsigned int __watch_rid;
 static bool __manual_render;
 static bool __iconified = false;
 static bool __is_bound = false;
-static int __viewer_visibility = AUL_SCREEN_STATUS_PAUSE;
+static int __viewer_visibility = AUL_SCREEN_STATUS_RESUME;
 
 static GList *__dead_cbs;
 struct dead_cb_s {
@@ -369,6 +369,7 @@ static void __screen_connector_toolkit_evas_added_cb(const char *appid, const ch
        evas_object_data_set(__win, "tbm,watch", image);
        screen_connector_toolkit_evas_get_rid(image, (int *)&__watch_rid);
        __flush_pending_queue(__watch_rid);
+       __change_viewer_visibility(__viewer_visibility, false);
 }
 
 static void __screen_connector_toolkit_evas_removed_cb(const char *appid, const char *instance_id, int pid,
@@ -488,6 +489,8 @@ API int watch_manager_get_app_control(const char *app_id, app_control_h *app_con
        app_control_add_extra_data(*app_control, "WATCH_WIDTH", buf);
        snprintf(buf, sizeof(buf), "%d", __watch_screen_get_height());
        app_control_add_extra_data(*app_control, "WATCH_HEIGHT", buf);
+       snprintf(buf, sizeof(buf), "%d", __viewer_visibility);
+       app_control_add_extra_data(*app_control, "WATCH_VIEWER_VISIBILITY", buf);
 
        app_control_set_operation(*app_control, APP_CONTROL_OPERATION_MAIN);