#include <app_manager.h>
+#include <system_info.h>
#define DEVNAME_BLOCK_SPACE 0
// #define SUPPORT_DIAG_USAGE
{
retm_if(szStr == NULL, "szStr parameter is NULL");
- char szBin[50];
- char szEmul[50];
-
- const char* szBinVer = NULL;
-
- dictionary* dic = iniparser_load(SETTING_ABOUT_INFO_PATH);
- if (dic) {
- szBinVer = (char*)iniparser_getstr(dic, "Version:Build");
- if (szBinVer) {
- char* str = g_strdup(szBinVer);
- if (str) {
- char* pPos = str;
- while (*pPos++) {
- if ('_' == *pPos)
- *pPos = ' ';
- }
- sscanf(str, "%s %s", szBin, szEmul);
- }
- G_FREE(str);
- }
+ char *value = NULL;
+ int ret = system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &value);
+ SETTING_TRACE("value : %s", value);
+ if (ret != SYSTEM_INFO_ERROR_NONE) {
+ SETTING_TRACE_ERROR("fail to call system_info_get_value_string");
+ FREE(value);
+ snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
+ return;
}
- if (!strncmp(szEmul, "emul", 4)) {
- snprintf(szStr, nSize, "%s", "SDK");
+ if (value) {
+ snprintf(szStr, nSize, "%s", value);
} else {
- if (!strncmp(szBin, "I9500", 5)) {
- snprintf(szStr, nSize, "GT-%s", szBin);
- } else if (!strncmp(szBin, "SLP", 3)) {
- snprintf(szStr, nSize, "GT-%s", szBin);
- } else {
- snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
- }
+ snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
}
- if (dic) {
- iniparser_freedict(dic);
- dic = NULL;
- }
+ FREE(value);
}
void setting_about_main_get_sw_version(char* szStr, int nSize)
Setting_GenGroupItem_Data *item_data = NULL;
if (ad->my_numbers.count == 1) {
item_data = calloc(1, sizeof(Setting_GenGroupItem_Data));
- setting_retm_if(!item_data, "calloc item_data failed");
+ setting_retvm_if(!item_data, FALSE, "calloc item_data failed");
item_data->keyStr = (char *)g_strdup("IDS_ST_BODY_MY_NUMBER");
item_data->sub_desc = (char *)g_strdup(sel_num);
item_data->swallow_type = SWALLOW_Type_INVALID;
setting_enable_expandable_genlist(ad->genlsit, ad,
setting_about_main_exp_cb, NULL);
item_data = calloc(1, sizeof(Setting_GenGroupItem_Data));
- setting_retm_if(!item_data, "calloc item_data failed");
+ setting_retvm_if(!item_data, FALSE, "calloc item_data failed");
item_data->keyStr = (char *)g_strdup("IDS_ST_BODY_MY_NUMBER");
item_data->sub_desc = (char *)g_strdup(sel_num);
item_data->swallow_type = SWALLOW_Type_INVALID;