summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuyoung Jang <duyoung.jang@samsung.com>2012-11-02 17:00:14 +0900
committerDuyoung Jang <duyoung.jang@samsung.com>2012-11-02 17:00:14 +0900
commite6d819a0b8c20f6883d23397eac9bfae53305844 (patch)
tree42def473be5fa081c828013d8401dcd3cffdfeb0
parent81e5b95df3b92a5d6597e71f153db78ef76b8049 (diff)
downloadinstaller-e6d819a0b8c20f6883d23397eac9bfae53305844.tar.gz
installer-e6d819a0b8c20f6883d23397eac9bfae53305844.tar.bz2
installer-e6d819a0b8c20f6883d23397eac9bfae53305844.zip
Modify system xml for Livebox
Change-Id: I61c7c68732db02a5f1f5e8c73453cdba00b6312a
-rwxr-xr-xsrc/XmlHandler/ManifestGenerator.cpp130
1 files changed, 58 insertions, 72 deletions
diff --git a/src/XmlHandler/ManifestGenerator.cpp b/src/XmlHandler/ManifestGenerator.cpp
index 82027c3..cea6a20 100755
--- a/src/XmlHandler/ManifestGenerator.cpp
+++ b/src/XmlHandler/ManifestGenerator.cpp
@@ -335,95 +335,81 @@ ManifestGenerator::WriteLiveboxes(_PackageAppInfoImpl* pAppInfoImpl) const
_PackageInfoImpl* pPackageInfoImpl = __pContext->GetPackageInfoImpl();
String label("label");
- if (pLiveboxList)
+ if (pLiveboxList == null)
{
- for (int j = 0 ; j < pLiveboxList->GetCount(); j++)
+ return true;
+ }
+
+ for (int j = 0 ; j < pLiveboxList->GetCount(); j++)
+ {
+ LiveboxInfo* pLiveboxInfo = dynamic_cast<LiveboxInfo*>(pLiveboxList->GetAt(j));
+ if (pLiveboxInfo == null)
{
- LiveboxInfo* pLiveboxInfo = dynamic_cast<LiveboxInfo*>(pLiveboxList->GetAt(j));
+ AppLogTag(OSP_INSTALLER, "pLiveboxInfo is null [%d]", j);
+ continue;
+ }
- if (pLiveboxInfo)
- {
- long long updatePeriod = pLiveboxInfo->GetUpdatePeriod();
- String period = LongLong::ToString(updatePeriod/1000);
- IMap* pLiveboxNameList = pLiveboxInfo->GetNameList();
- ArrayList* pSizeList = pLiveboxInfo->GetSizeList();
- String popupEnabled = pLiveboxInfo->GetPopupEnabled();
+ long long updatePeriod = pLiveboxInfo->GetUpdatePeriod();
+ String period = LongLong::ToString(updatePeriod/1000);
+ IMap* pLiveboxNameList = pLiveboxInfo->GetNameList();
+ ArrayList* pSizeList = pLiveboxInfo->GetSizeList();
+ String popupEnabled = pLiveboxInfo->GetPopupEnabled();
- __pWriter->StartElement("livebox");
+ __pWriter->StartElement("livebox");
- __pWriter->WriteAttribute("appid", pAppInfoImpl->GetPackageName());
- __pWriter->WriteAttribute("period", period);
- __pWriter->WriteAttribute("pinup", "false");
- __pWriter->WriteAttribute("primary", "true");
- __pWriter->WriteAttribute("auto_launch", "false");
- __pWriter->WriteAttribute("abi", "osp");
+ __pWriter->WriteAttribute("appid", pAppInfoImpl->GetPackageName());
+ __pWriter->WriteAttribute("period", period);
+ __pWriter->WriteAttribute("pinup", "false");
+ __pWriter->WriteAttribute("primary", "true");
+ __pWriter->WriteAttribute("auto_launch", "false");
+ __pWriter->WriteAttribute("abi", "osp");
- WriteLanguageValue(pLiveboxNameList, label);
+ WriteLanguageValue(pLiveboxNameList, label);
- if (pLiveboxInfo->GetIcon().IsEmpty() == false)
- {
- String liveboxIcon;
- liveboxIcon.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_ICONS, pLiveboxInfo->GetIcon().GetPointer());
+ if (pLiveboxInfo->GetIcon().IsEmpty() == false)
+ {
+ String liveboxIcon;
+ liveboxIcon.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_ICONS, pLiveboxInfo->GetIcon().GetPointer());
- __pWriter->StartElement("icon");
- __pWriter->WriteString(liveboxIcon);
- __pWriter->EndElement();
- }
+ __pWriter->StartElement("icon");
+ __pWriter->WriteString(liveboxIcon);
+ __pWriter->EndElement();
+ }
- if (pSizeList)
- {
- __pWriter->StartElement("box");
- __pWriter->WriteAttribute("type", "buffer");
+ if (pSizeList)
+ {
+ __pWriter->StartElement("box");
+ __pWriter->WriteAttribute("type", "buffer");
- for (int k = 0 ; k < pSizeList->GetCount(); k++)
- {
- String* pSize = dynamic_cast<String*>(pSizeList->GetAt(k));
-
- if (pSize)
- {
- String convertedSize;
-
- if ((*pSize) == L"1x1")
- {
- convertedSize = L"172x172";
- }
- else if((*pSize) == L"2x1")
- {
- convertedSize = L"348x172";
- }
- else if((*pSize) == L"2x2")
- {
- convertedSize = L"348x348";
- }
- else if((*pSize) == L"4x2")
- {
- convertedSize = L"700x348";
- }
-
- __pWriter->StartElement("size");
- __pWriter->WriteString(convertedSize);
- __pWriter->EndElement();
- }
- }
- __pWriter->EndElement();
+ for (int k = 0 ; k < pSizeList->GetCount(); k++)
+ {
+ String* pSize = dynamic_cast<String*>(pSizeList->GetAt(k));
+ if (pSize == null)
+ {
+ AppLogTag(OSP_INSTALLER, "pSize is null [%d]", k);
+ continue;
}
- popupEnabled.ToLowerCase();
- if (popupEnabled == L"true")
- {
- __pWriter->StartElement("pd");
- __pWriter->WriteAttribute("type", "buffer");
+ __pWriter->StartElement("size");
+ __pWriter->WriteString(*pSize);
+ __pWriter->EndElement();
+ }
+ __pWriter->EndElement();
+ }
- __pWriter->StartElement("size");
- __pWriter->WriteString("720x250");
- __pWriter->EndElement();
+ popupEnabled.ToLowerCase();
+ if (popupEnabled == L"true")
+ {
+ __pWriter->StartElement("pd");
+ __pWriter->WriteAttribute("type", "buffer");
- __pWriter->EndElement();
- }
- }
+ __pWriter->StartElement("size");
+ __pWriter->WriteString("720x250");
+ __pWriter->EndElement();
__pWriter->EndElement();
}
+ __pWriter->EndElement();
}
return true;