From 1c67bdca0c2f2c8d0f80e0940579c6ad394d009b Mon Sep 17 00:00:00 2001 From: Jinkun Jang Date: Sat, 16 Mar 2013 01:04:54 +0900 Subject: merge with master --- src/pkg_event.c | 6 +----- src/starter.c | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/pkg_event.c b/src/pkg_event.c index f03b9ef..f3df8c5 100755 --- a/src/pkg_event.c +++ b/src/pkg_event.c @@ -286,11 +286,7 @@ void pkg_event_fini(void) for (i = 0; i < CONF_PATH_NUMBER; i ++) { if (paths[i].wd) { if (inotify_rm_watch(s_desktop_notifier.ifd, paths[i].wd) < 0) { - char log[BUFSZE] = {0,}; - int ret; - - ret = strerror_r(errno, log, sizeof(log)); - _E("Error: %s", ret == 0? log : "unknown error"); + _E("Error: %s", strerror(errno)); } paths[i].wd = 0; } diff --git a/src/starter.c b/src/starter.c index c90601c..67bc680 100755 --- a/src/starter.c +++ b/src/starter.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "starter.h" #include "starter-util.h" @@ -45,6 +46,7 @@ #define DEFAULT_THEME "tizen" #define PWLOCK_PATH "/usr/apps/org.tizen.pwlock/bin/pwlock" #define PWLOCK_PKG_NAME "org.tizen.pwlock" +#define QP_EMUL_STR "Emulator" static void lock_menu_screen(void) { @@ -82,12 +84,35 @@ static void _set_elm_theme(void) free(vstr); } +static int _check_emul() +{ + int is_emul = 0; + char *info = NULL; + + if (system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &info) == 0) { + if (info == NULL) return 0; + if (!strncmp(QP_EMUL_STR, info, strlen(info))) { + is_emul = 1; + } + } + + if (info != NULL) free(info); + + return is_emul; +} + static int _launch_pwlock(void) { int r; _DBG("%s", __func__); + if(_check_emul()) { + _DBG("Emulator => skip pwlock"); + vconf_set_int(VCONFKEY_STARTER_SEQUENCE, 1); + return 0; + } + r = aul_launch_app(PWLOCK_PKG_NAME, NULL); if (r < 0) { _ERR("PWLock launch error: error(%d)", r); @@ -152,7 +177,6 @@ static void _init(struct appdata *ad) { int r; struct sigaction act; - char *file = NULL; memset(&act,0x00,sizeof(struct sigaction)); act.sa_sigaction = _signal_handler; -- cgit v1.2.3