[Title] change for network type info api
authorgreatim <jaewon81.lim@samsung.com>
Thu, 4 Jul 2013 02:29:04 +0000 (11:29 +0900)
committergreatim <jaewon81.lim@samsung.com>
Thu, 4 Jul 2013 02:29:04 +0000 (11:29 +0900)
[Desc.]
[Issue]

Change-Id: Ib5092027287ee672e0c5920fce4a942b3e5ed193

daemon/sys_stat.c
packaging/dynamic-analysis-manager.changes
packaging/dynamic-analysis-manager.spec

index a89cba7..f17973d 100644 (file)
@@ -1581,20 +1581,48 @@ static int get_camera_count()
        return count;
 }
 
+static int get_device_network_type(char* buf, int buflen)
+{
+       int len = 0;
+       bool bool_var;
+
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.cdma", &bool_var);
+       if(bool_var) len += sprintf(buf + len, "CDMA");
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.edge", &bool_var);
+       if(bool_var) len += sprintf(buf + len, ",EDGE");
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.gprs", &bool_var);
+       if(bool_var) len += sprintf(buf + len, ",GPRS");
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.gsm", &bool_var);
+       if(bool_var) len += sprintf(buf + len, ",GSM");
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.hsdpa", &bool_var);
+       if(bool_var) len += sprintf(buf + len, ",HSDPA");
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.hspa", &bool_var);
+       if(bool_var) len += sprintf(buf + len, ",HSPA");
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.hsupa", &bool_var);
+       if(bool_var) len += sprintf(buf + len, ",HSUPA");
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.umts", &bool_var);
+       if(bool_var) len += sprintf(buf + len, ",UMTS");
+       system_info_get_platform_bool("tizen.org/feature/network.telephony.service.lte", &bool_var);
+       if(bool_var) len += sprintf(buf + len, ",LTE");
+
+       return len;
+}
+
 static int get_device_availability_info(char* buf, int buflen)
 {
        int camera_count = 0;
        bool blue_support = false;
        bool gps_support = false;
        bool wifi_support = false;
-       char* networktype = NULL;
+       char networktype[128];
+       int network_len;
        int loglen = 0;
 
 #ifndef LOCALTEST
        system_info_get_platform_bool("tizen.org/feature/network.bluetooth", &blue_support);
        camera_count = get_camera_count();
        system_info_get_platform_bool("tizen.org/feature/location.gps", &gps_support);
-       system_info_get_value_string(SYSTEM_INFO_KEY_NETWORK_TYPE, &networktype);
+       network_len = get_device_network_type(networktype, 128);
        system_info_get_platform_bool("tizen.org/feature/network.wifi", &wifi_support);
 #endif
 
@@ -1604,10 +1632,9 @@ static int get_device_availability_info(char* buf, int buflen)
                        (int)wifi_support,
                        camera_count);
 
-       if(networktype != NULL)
+       if(network_len > 0)
        {
                loglen += sprintf(buf + loglen, "%s", networktype);
-               free(networktype);
        }
        else
        {
index dd4d41f..1a532d3 100644 (file)
@@ -1,4 +1,7 @@
-* 2.2.0
+* 2.2.0_2
+- change network type info api by request from scm
+== Jaewon Lim <jaewon81.lim@samsung.com> 2013-07-04 11:00
+* 2.2.0_1
 - change some runtime system api by request from scm
 == Jaewon Lim <jaewon81.lim@samsung.com> 2013-07-03 16:00
 
index 3219e80..1dc51d4 100644 (file)
@@ -1,7 +1,7 @@
 Name:       dynamic-analysis-manager
 Summary:    dynamic analyzer manager
 Version:    2.2.0
-Release:    1
+Release:    2
 Group:      System/Libraries
 License:       Apache License, Version 2
 Source:    %{name}_%{version}.tar.gz