const int HEARTBEAT_WAIT_COUNT = 3;
const wchar_t SERVICE_APPID[] = L"aospd00043.osp-app-service";
const char SELECTOR_RESPONSE_KEY[] = "__APP_SVC_START_INFO__";
+const wchar_t FILE_SCHEME_WITH_DELIMITER[] = L"file://";
#ifndef VCONFKEY_APPSERVICE_STATUS
#define VCONFKEY_APPSERVICE_STATUS "memory/appservice/status"
#endif
if (p)
{
uri = p;
+ if (uri[0] == L'/')
+ {
+ // SLP deals with the URI as plain /opt/.../a.jpg.
+ uri.Insert(FILE_SCHEME_WITH_DELIMITER, 0);
+ }
pUri = &uri;
SysLog(NID_APP, "Delivered uri is [%ls].", pUri->GetPointer());
result
_AppResourceString::InitializeStringInfo(String& resourceFolder)
{
- char* pValue = null;
- int ret = runtime_info_get_value_string(RUNTIME_INFO_KEY_LANGUAGE, &pValue);
+ char* pVal = null;
+ int ret = runtime_info_get_value_string(RUNTIME_INFO_KEY_LANGUAGE, &pVal);
SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "runtime_info_get_value_string returns %d.", ret);
- U_ICU_NAMESPACE::Locale icuLcl(pValue);
+ U_ICU_NAMESPACE::Locale icuLcl(pVal);
String language(icuLcl.getISO3Language());
String country(icuLcl.getCountry());
+ if (pVal)
+ {
+ free(pVal);
+ }
String resFilename;
result r = resFilename.Format(256 * 2 + 10, L"%ls-%ls.xml", language.GetPointer(), country.GetPointer());
pXmlNodeMap->Add(*pKey, *pValue);
pKey.release();
pValue.release();
+
+ if (pContent)
+ {
+ xmlFree(pContent);
+ }
+ }
+
+ if (pxmlValue)
+ {
+ xmlFree(pxmlValue);
+ pxmlValue = null;
}
}