#include <dlog.h>
#define TFEATURE_LOG_TAG "TFEATURE"
-#define TFEATURE_INFO(fmt,args...) do { RLOG(LOG_INFO, TFEATURE_LOG_TAG, fmt "\n", ##args); } while (0)
-#define TFEATURE_WARN(fmt,args...) do { RLOG(LOG_WARN, TFEATURE_LOG_TAG, fmt "\n", ##args); } while (0)
-#define TFEATURE_ERR(fmt,args...) do { RLOG(LOG_ERROR, TFEATURE_LOG_TAG, fmt "\n", ##args); } while (0)
+#define TFEATURE_INFO(fmt, args...) do { RLOG(LOG_INFO, TFEATURE_LOG_TAG, fmt "\n", ##args); } while (0)
+#define TFEATURE_WARN(fmt, args...) do { RLOG(LOG_WARN, TFEATURE_LOG_TAG, fmt "\n", ##args); } while (0)
+#define TFEATURE_ERR(fmt, args...) do { RLOG(LOG_ERROR, TFEATURE_LOG_TAG, fmt "\n", ##args); } while (0)
#define FEATURE_BITS (sizeof(unsigned char) * 8)
#define MAX_FEATURE_LIST_BYTES (FEATURE_BITS * 4)
unsigned char feature_list[MAX_FEATURE_LIST_BYTES]; // support 255 (2 ^ FEATURE_BITS) features
} q_feature_info;
-static q_feature_info features = {FALSE, {0,}};
+static q_feature_info features = {FALSE, {0,} };
static void _tfeature_check_default_feature(void)
{
#endif
}
-static void _tfeature_check_model_config()
+static void _tfeature_check_platform_feature()
{
- char *model_name;
int ret;
+ char *model_name;
bool b_lte_supported = false;
bool b_gsm_supported = false;
bool b_umts_suported = false;
bool b_cdma_supported = false;
ret = system_info_get_platform_string("http://tizen.org/system/model_name", &model_name);
- if (SYSTEM_INFO_ERROR_NONE == ret && model_name) {
- TFEATURE_INFO("model_name[%s]", model_name);
- free(model_name);
+ if (ret != SYSTEM_INFO_ERROR_NONE) {
+ TFEATURE_INFO("system_info_get_platform_string() failed!!! (%d,%s)", ret, get_error_message(ret));
+ return;
+ }
+
+ TFEATURE_INFO("model_name[%s]", model_name);
+ if (!g_strcmp0(model_name, "TW2")) {
+ SET_FEATURE(TFEATURE_DEVICE_CHIPSET_VENDOR_EXYNOS);
+ SET_FEATURE(TFEATURE_FUNCTION_SEND_APN_INFO);
}
+
+ free(model_name);
+
system_info_get_platform_bool("tizen.org/feature/network.telephony.service.cdma", &b_cdma_supported);
system_info_get_platform_bool("tizen.org/feature/network.telephony.service.gsm", &b_gsm_supported);
system_info_get_platform_bool("tizen.org/feature/network.telephony.service.umts", &b_umts_suported);
system_info_get_platform_bool("tizen.org/feature/network.telephony.service.lte", &b_lte_supported);
- if(true == b_lte_supported && false == b_gsm_supported && false == b_umts_suported && false == b_cdma_supported){
+ if (true == b_lte_supported) {
+ TFEATURE_INFO("LTE SUPPORTED");
+ SET_FEATURE(TFEATURE_DEVICE_LTE_SUPPORTED);
+ }
+
+ if (true == b_lte_supported && false == b_gsm_supported && false == b_umts_suported && false == b_cdma_supported) {
TFEATURE_INFO("LTE only model");
SET_FEATURE(TFEATURE_DEVICE_LTE_ONLY);
}
memset(buf, 0, 255);
g_snprintf(buf, 255, "%s%04X: ", "[FEATURE_LIST]", i + 1);
} else {
- g_strlcat (buf, " ", 255);
+ g_strlcat(buf, " ", 255);
}
}
}
{
_tfeature_check_default_feature();
_tfeature_check_build_feature();
- _tfeature_check_model_config();
+ _tfeature_check_platform_feature();
_tfeature_print_hex_dump();
features.valid = TRUE;
if (!features.valid) {
_tfeature_init();
+ TFEATURE_INFO("TFEATURE INITIALIZED!!!");
}
if (features.valid && feature < TFEATURE_MAX_VALUE) {