enum watch_visible_state watch_visibility;
bool ambient_mode;
bool ambient_mode_skip_resume;
+ bool bg_launch;
guint pause_timer;
void *data;
};
static void __on_window_show(int type, void *event, void *data)
{
+ LOGW("on window show bg_launch(%d)", __context.bg_launch);
appcore_ui_base_window_on_show(type, event);
- appcore_ui_base_resume();
+ if (__context.bg_launch) {
+ appcore_ui_base_resume();
+ appcore_ui_base_pause();
+ } else {
+ appcore_ui_base_resume();
+ }
}
static gboolean __delayed_pause(gpointer data)
__add_pause_timer();
} else {
__context.watch_visibility = WVS_RESUME;
+ __context.bg_launch = false;
__remove_pause_timer();
__on_ui_base_resume(NULL);
}
bundle *kb;
char *width_str = NULL;
char *height_str = NULL;
+ char *bg_launch_str = NULL;
+ bool bg_launch = false;
int width = 360;
int height = 360;
appcore_ui_base_ops ops = appcore_ui_base_get_default_ops();
if (kb) {
bundle_get_str(kb, "WATCH_WIDTH", &width_str);
bundle_get_str(kb, "WATCH_HEIGHT", &height_str);
+ bundle_get_str(kb, "WATCH_BG_LAUNCH", &bg_launch_str);
if (width_str)
width = atoi(width_str);
if (height_str)
height = atoi(height_str);
+ if (bg_launch_str)
+ bg_launch = atoi(bg_launch_str);
+
bundle_free(kb);
} else {
_E("failed to get launch argv");
}
__context.callback = *callback;
+ __context.bg_launch = bg_launch;
__context.width = width;
__context.height = height;
__context.watch_visibility = WVS_UNKNOWN;