if (ret.IsError()) {
count = 0;
} else {
- count = kDefaultPropertyCount;
+ count = sim_mgr.GetSimCount(system_info_listeners.GetTapiHandles());
}
} else if ("SIM" == property) {
PlatformResult ret = CheckTelephonySupport();
} else if ("ETHERNET_NETWORK" == property) {
return ReportEthernetNetwork(res_obj);
} else if ("CELLULAR_NETWORK" == property) {
- return ReportCellularNetwork(res_obj);
+ return ReportCellularNetwork(res_obj, index);
} else if ("SIM" == property) {
return ReportSim(res_obj, index);
} else if ("PERIPHERAL" == property) {
return ret;
}
+ LoggerD("property name: %s", property.c_str());
+ LoggerD("available property count: %d", property_count);
for (size_t i = 0; i < property_count; i++) {
picojson::value result = picojson::value(picojson::object());
picojson::object& result_obj = result.get<picojson::object>();
return PlatformResult(ErrorCode::NO_ERROR);
}
-PlatformResult SysteminfoUtils::ReportCellularNetwork(picojson::object& out) {
+PlatformResult SysteminfoUtils::ReportCellularNetwork(picojson::object& out, unsigned long count) {
PlatformResult ret = CheckTelephonySupport();
if (ret.IsError()) {
return ret;
return ret;
}
//gathering connection informations
- ret = FetchConnection(system_info_listeners.GetTapiHandle(),
+ ret = FetchConnection(system_info_listeners.GetTapiHandles()[count],
&result_status, &result_apn, &result_ip_address, &result_ipv6_address, &result_imei);
if (ret.IsError()) {
return ret;
static common::PlatformResult ReportNetwork(picojson::object& out);
static common::PlatformResult ReportWifiNetwork(picojson::object& out);
static common::PlatformResult ReportEthernetNetwork(picojson::object& out);
- static common::PlatformResult ReportCellularNetwork(picojson::object& out);
+ static common::PlatformResult ReportCellularNetwork(picojson::object& out, unsigned long count);
static common::PlatformResult ReportSim(picojson::object& out, unsigned long count);
static common::PlatformResult ReportPeripheral(picojson::object& out);
static common::PlatformResult ReportMemory(picojson::object& out);