summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:04:54 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:04:54 +0900
commit1c67bdca0c2f2c8d0f80e0940579c6ad394d009b (patch)
tree0d916078976e12fbf710fd3fa09f16632e437d07 /src
parent62d214f6031c50109217a6162e09be3bcc1656cf (diff)
downloadstarter-1c67bdca0c2f2c8d0f80e0940579c6ad394d009b.tar.gz
starter-1c67bdca0c2f2c8d0f80e0940579c6ad394d009b.tar.bz2
starter-1c67bdca0c2f2c8d0f80e0940579c6ad394d009b.zip
merge with master
Diffstat (limited to 'src')
-rwxr-xr-xsrc/pkg_event.c6
-rwxr-xr-xsrc/starter.c26
2 files changed, 26 insertions, 6 deletions
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 <vconf.h>
#include <heynoti.h>
#include <signal.h>
+#include <system_info.h>
#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;