From: sinikang Date: Thu, 21 Feb 2019 08:15:46 +0000 (+0900) Subject: Modify tfeature init sequence X-Git-Tag: accepted/tizen/5.5/unified/20191031.020337^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_5.5;p=platform%2Fcore%2Ftelephony%2Ftel-plugin-database.git Modify tfeature init sequence - remove function of model config - add TFEATURE_DEVICE_LTE_SUPPORTED Change-Id: Ibfdb0e33da2aeda689407a4dbc31d407d3a5e5d8 Signed-off-by: sinikang --- diff --git a/feature/include/tfeature.h b/feature/include/tfeature.h index 83f8983..bb4661b 100644 --- a/feature/include/tfeature.h +++ b/feature/include/tfeature.h @@ -73,6 +73,12 @@ typedef enum { TFEATURE_FUNCTION_ATTACH_APN_INTERNET, TFEATURE_FUNCTION_BACKUP_APN, TFEATURE_FUNCTION_SUPPORT_MF_ONLY_ESIM_CARD, + TFEATURE_FUNCTION_ASRVCC, + TFEATURE_FUNCTION_SS_CONFIG_CS_ONLY, + TFEATURE_FUNCTION_BIP_MANAGER_APP, + TFEATURE_FUNCTION_SUPPORT_VOLTE, + TFEATURE_FUNCTION_ACTIVATION_PROCESS, + TFEATURE_FUNCTION_EMPTY_ATTACH_APN, TFEATURE_FUNCTION_MAX_VALUE = 0x7F, /* UI feature : 0x81 ~ 0xBF */ @@ -93,6 +99,7 @@ typedef enum { TFEATURE_DEVICE_NO_DISPLAY_PANEL = 0xC1, TFEATURE_DEVICE_WEARABLE, TFEATURE_DEVICE_LTE_ONLY, + TFEATURE_DEVICE_LTE_SUPPORTED, TFEATURE_DEVICE_CHIPSET_VENDOR_EXYNOS, diff --git a/feature/tfeature.c b/feature/tfeature.c index 36d40ec..df6ebdb 100644 --- a/feature/tfeature.c +++ b/feature/tfeature.c @@ -28,9 +28,9 @@ #include #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) @@ -50,7 +50,7 @@ typedef struct { 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) { @@ -94,37 +94,16 @@ static void _tfeature_check_build_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); - } - 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){ - TFEATURE_INFO("LTE only model"); - SET_FEATURE(TFEATURE_DEVICE_LTE_ONLY); - } -} - -static void _tfeature_check_platform_feature() -{ - int ret; - char *model_name; - - ret = system_info_get_platform_string("http://tizen.org/system/model_name", &model_name); if (ret != SYSTEM_INFO_ERROR_NONE) { TFEATURE_INFO("system_info_get_platform_string() failed!!! (%d,%s)", ret, get_error_message(ret)); return; @@ -137,6 +116,21 @@ static void _tfeature_check_platform_feature() } 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) { + 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); + } } static void _tfeature_print_hex_dump() @@ -156,7 +150,7 @@ static void _tfeature_print_hex_dump() memset(buf, 0, 255); g_snprintf(buf, 255, "%s%04X: ", "[FEATURE_LIST]", i + 1); } else { - g_strlcat (buf, " ", 255); + g_strlcat(buf, " ", 255); } } } @@ -168,7 +162,6 @@ static void _tfeature_init(void) { _tfeature_check_default_feature(); _tfeature_check_build_feature(); - _tfeature_check_model_config(); _tfeature_check_platform_feature(); _tfeature_print_hex_dump(); @@ -181,6 +174,7 @@ tfeature_support tfeature_is_supported(tfeature_name feature) if (!features.valid) { _tfeature_init(); + TFEATURE_INFO("TFEATURE INITIALIZED!!!"); } if (features.valid && feature < TFEATURE_MAX_VALUE) { diff --git a/packaging/tel-plugin-database.spec b/packaging/tel-plugin-database.spec index 113fa52..f9e2f71 100644 --- a/packaging/tel-plugin-database.spec +++ b/packaging/tel-plugin-database.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 1 -%define patchlevel 46 +%define patchlevel 47 Name: tel-plugin-database Version: %{major}.%{minor}.%{patchlevel} diff --git a/src/database_main.c b/src/database_main.c index 4a23f7c..98dcde7 100644 --- a/src/database_main.c +++ b/src/database_main.c @@ -88,7 +88,7 @@ static gboolean __update_query_database(Storage *strg, void *handle, const char } rv = sqlite3_step(stmt); - dbg("query executed (%d)", rv); + dbg("update query executed (%d)", rv); sqlite3_finalize(stmt); if (rv != SQLITE_DONE)