summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsunyeop.hwnag <sunyeop.hwang@samsung.com>2012-08-22 11:14:13 (GMT)
committersunyeop.hwnag <sunyeop.hwang@samsung.com>2012-08-22 11:14:13 (GMT)
commite7b4fa62d8c8860adc70625f70190f77becc8c91 (patch)
tree25c89b6ae3b5c0a3764b781ba265edf3b781c428
parentde0583fe580f60dbe6df346302d9b5a0d6d0bc5e (diff)
downloadpwlock-e7b4fa62d8c8860adc70625f70190f77becc8c91.zip
pwlock-e7b4fa62d8c8860adc70625f70190f77becc8c91.tar.gz
pwlock-e7b4fa62d8c8860adc70625f70190f77becc8c91.tar.bz2
skip tapi ready re-check when pwlock run with emulator
Change-Id: Ia272bbc1e7754014e52e90a135d0fb100c72351e
-rwxr-xr-xCMakeLists.txt1
-rwxr-xr-xpackaging/org.tizen.pwlock.spec1
-rwxr-xr-xsrc/pwlock.c14
3 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2211e8..0e3f62c 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,7 @@ pkg_check_modules(pkgs REQUIRED
accounts-svc
appsvc
iniparser
+ capi-system-info
)
FOREACH(flag ${pkgs_CFLAGS})
diff --git a/packaging/org.tizen.pwlock.spec b/packaging/org.tizen.pwlock.spec
index d5439cd..3d06bb7 100755
--- a/packaging/org.tizen.pwlock.spec
+++ b/packaging/org.tizen.pwlock.spec
@@ -23,6 +23,7 @@ BuildRequires: pkgconfig(appsvc)
BuildRequires: pkgconfig(sysman)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(iniparser)
+BuildRequires: pkgconfig(capi-system-info)
BuildRequires: gettext
BuildRequires: cmake
BuildRequires: edje-tools
diff --git a/src/pwlock.c b/src/pwlock.c
index 4358b56..ac662ed 100755
--- a/src/pwlock.c
+++ b/src/pwlock.c
@@ -24,6 +24,7 @@
#include <vconf.h>
#include <utilX.h>
#include <ui-gadget.h>
+#include <system_info.h>
#include "pwlock.h"
#include "util.h"
@@ -448,9 +449,20 @@ Eina_Bool vconf_tapi_ready_expire_cb(void *pData)
static int do_ST_TAPI_INIT(struct appdata *ad)
{
int r;
+ int is_emul;
+ char *model = NULL;
_DBG("%s", __func__);
+ system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &model);
+ _DBG("SYSTEM_INFO_KEY_MODEL=%s\n", model);
+ if (!strncmp("Emulator", model, sizeof(model)))
+ is_emul = 1;
+ else
+ is_emul = 0;
+
+ PWLOCK_MEMFREE(model);
+
ad->t = pwlock_tapi_init(pwlock_tapi_cb, ad);
if (ad->t == NULL) {
_ERR("TAPI init error");
@@ -472,7 +484,7 @@ static int do_ST_TAPI_INIT(struct appdata *ad)
r = pwlock_tapi_ready_check();
_DBG("tapi_ready_check : %d", r);
- if (r == 0) {
+ if (r == 0 && is_emul == 0) {
/* SHOULD MANAGE TIMER FROM NOW - START PART */
ad->pTimerId =
ecore_timer_add(20, vconf_tapi_ready_expire_cb, ad);