diff options
-rwxr-xr-x | CMakeLists.txt | 1 | ||||
-rwxr-xr-x | packaging/starter.spec | 3 | ||||
-rwxr-xr-x | src/starter.c | 25 |
3 files changed, 28 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d03f51b..fec3928 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ pkg_check_modules(pkgs REQUIRED ui-gadget-1 bundle capi-appfw-application + capi-system-info ) FOREACH(flag ${pkgs_CFLAGS}) diff --git a/packaging/starter.spec b/packaging/starter.spec index 8fa0551..ebc804a 100755 --- a/packaging/starter.spec +++ b/packaging/starter.spec @@ -1,6 +1,6 @@ Name: starter Summary: starter -Version: 0.4.56 +Version: 0.4.57 Release: 2 Group: TO_BE/FILLED_IN License: TO_BE/FILLED_IN @@ -33,6 +33,7 @@ BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(capi-system-info) BuildRequires: cmake BuildRequires: edje-bin BuildRequires: gettext-tools diff --git a/src/starter.c b/src/starter.c index c90601c..e76f0e9 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); |