bundle_keyval_get_array_val(const_cast<bundle_keyval_t*>(pVal), &pArr, &size, NULL);
if (pArr && size > 0)
{
- String str = static_cast<char*>(*pArr);
- for (size_t i = 1; i < size; i++)
+ ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ if (pList)
{
- str += L';';
- str += static_cast<char*>(*(pArr + i));
+ pList->Construct();
+
+ for (size_t i = 0; i < size; i++)
+ {
+ // type unsafe ugly static casting required
+ pList->Add(new (std::nothrow) String(static_cast<char*>(*(pArr + i))));
+ }
+
+ const int count = pList->GetCount();
+ if (count != 0)
+ {
+ SysLog(NID_APP, "Adding %d elements for %s", count, pKey);
+ pMap->Add(new (std::nothrow) String(pKey), pList);
+ }
+ else
+ {
+ SysLog(NID_APP, "No object for %s", pKey);
+ delete pList;
+ }
}
-
- SysLog(NID_APP, "(%s, %ls)", pKey, str.GetPointer());
- pMap->Add(new (std::nothrow) String(pKey), new (std::nothrow) String(str));
}
else
{