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
(int)wifi_support,
camera_count);
- if(networktype != NULL)
+ if(network_len > 0)
{
loglen += sprintf(buf + loglen, "%s", networktype);
- free(networktype);
}
else
{