Modify tfeature init sequence 99/200299/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.020337 accepted/tizen/5.5/unified/mobile/hotfix/20201027.080130 accepted/tizen/5.5/unified/wearable/hotfix/20201027.111151 accepted/tizen/unified/20190312.113120 submit/tizen/20190222.003221 submit/tizen/20190312.004439 submit/tizen_5.5/20191031.000005 submit/tizen_5.5_mobile_hotfix/20201026.185105 submit/tizen_5.5_wearable_hotfix/20201026.184305 tizen_5.5.m2_release
authorsinikang <sinikang@samsung.com>
Thu, 21 Feb 2019 08:15:46 +0000 (17:15 +0900)
committersinikang <sinikang@samsung.com>
Thu, 21 Feb 2019 08:15:46 +0000 (17:15 +0900)
 - remove function of model config
 - add TFEATURE_DEVICE_LTE_SUPPORTED

Change-Id: Ibfdb0e33da2aeda689407a4dbc31d407d3a5e5d8
Signed-off-by: sinikang <sinikang@samsung.com>
feature/include/tfeature.h
feature/tfeature.c
packaging/tel-plugin-database.spec
src/database_main.c

index 83f8983..bb4661b 100644 (file)
@@ -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,
 
index 36d40ec..df6ebdb 100644 (file)
@@ -28,9 +28,9 @@
 #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)
@@ -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) {
index 113fa52..f9e2f71 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 46
+%define patchlevel 47
 
 Name:           tel-plugin-database
 Version:        %{major}.%{minor}.%{patchlevel}
index 4a23f7c..98dcde7 100644 (file)
@@ -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)