summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsunyeop.hwnag <sunyeop.hwang@samsung.com>2012-08-28 01:45:59 (GMT)
committersunyeop.hwnag <sunyeop.hwang@samsung.com>2012-08-28 01:45:59 (GMT)
commit50659a7e8fdd7819990e95c08795aa03f1f2dbf3 (patch)
treefe9651ab5360e8355e6141c3528742110ceea0b8
parent4cafc061a707d661b6caaa19cb4ee91f6de6d020 (diff)
downloadpwlock-50659a7e8fdd7819990e95c08795aa03f1f2dbf3.zip
pwlock-50659a7e8fdd7819990e95c08795aa03f1f2dbf3.tar.gz
pwlock-50659a7e8fdd7819990e95c08795aa03f1f2dbf3.tar.bz2
Use system info api for get model name
Change-Id: If638611a445bb17fb70002bcdfe23e6b9ca54eb8
-rwxr-xr-xinclude/pwlock.h2
-rwxr-xr-xinclude/util.h1
-rwxr-xr-xsrc/ui.c17
3 files changed, 12 insertions, 8 deletions
diff --git a/include/pwlock.h b/include/pwlock.h
index 8e5cf91..1f8b5eb 100755
--- a/include/pwlock.h
+++ b/include/pwlock.h
@@ -47,8 +47,6 @@
#define EDJFILE EDJDIR"/"PACKAGE".edj"
-#define PWLOCK_DEVICE_NAME "db/setting/device_name"
-
typedef enum _UG_BUTTON_STATE {
UG_BUTTON_STATE_NONE = 0,
UG_BUTTON_STATE_NEXT_CLICKED = 1,
diff --git a/include/util.h b/include/util.h
index 3f30ab1..e15426d 100755
--- a/include/util.h
+++ b/include/util.h
@@ -121,6 +121,5 @@ char *pwlock_get_string(int id);
Evas_Object *create_win(const char *name);
Evas_Object *load_edj(Evas_Object * parent, const char *file,
const char *group);
-int pwlock_get_model_number(char *buf, int max_size);
void pwlock_tolower(char *src, char *dest);
#endif /* __PWLOCK_UTIL_H__ */
diff --git a/src/ui.c b/src/ui.c
index 11f2c17..bff73bb 100755
--- a/src/ui.c
+++ b/src/ui.c
@@ -23,6 +23,7 @@
#include <vconf.h>
#include <ail.h>
#include <appsvc.h>
+#include <system_info.h>
#include "pwlock.h"
#include "util.h"
@@ -1477,20 +1478,26 @@ int show_greeting(struct appdata *ad) {
contents = pwlock_add_layout_from_edj(navi, EDJFILE, "pwlock-menu-lang");
- model_name = vconf_get_str(PWLOCK_DEVICE_NAME);
- _DBG("Device Name = %s\n",model_name);
+ system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &model_name);
+ _DBG("SYSTEM_INFO_KEY_MODEL = %s\n", model_name);
+
+ if (!strncmp("Emulator", model_name, sizeof(model_name))) {
+ PWLOCK_MEMFREE(model_name);
+ system_info_get_value_string(SYSTEM_INFO_KEY_PLATFORM_NAME, &model_name);
+ _DBG("SYSTEM_INFO_KEY_PLATFORM_NAME = %s\n", model_name);
+ }
if (model_name != NULL) {
+ _DBG("Device Name = %s\n", model_name);
elm_object_part_text_set(contents, "text.greeting.1", pwlock_get_string(IDS_IDLE_BODY_GREETING_WELCOME));
elm_object_part_text_set(contents, "text.greeting.2", model_name);
-
- free(model_name);
- model_name = NULL;
}
else {
elm_object_part_text_set(contents, "text.greeting.1", pwlock_get_string(IDS_SCM_BODY_WELCOME_E));
}
+ PWLOCK_MEMFREE(model_name);
+
elm_object_part_text_set(contents, "text.help",
pwlock_get_string(IDS_STU_BODY_SELECT_LANGUAGE));