add size check for app widget(ignore not supported sizes)
[platform/framework/native/installer.git] / src / XmlHandler / Parser / ManifestLiveboxesParser.cpp
index 0a4c3ff..8deedcc 100755 (executable)
@@ -211,8 +211,30 @@ ManifestLiveboxesParser::OnLiveboxEndElement(void)
 }
 
 bool
+ManifestLiveboxesParser::IsValidSize(const char *pCharacters)
+{
+       if (strcasecmp(pCharacters, "1x1") == 0
+         || strcasecmp(pCharacters, "2x1") == 0
+         || strcasecmp(pCharacters, "2x2") == 0
+         || strcasecmp(pCharacters, "4x1") == 0
+         || strcasecmp(pCharacters, "4x2") == 0
+         || strcasecmp(pCharacters, "4x3") == 0
+         || strcasecmp(pCharacters, "4x4") == 0 )
+       {
+               return true;
+       }
+       return false;
+}
+
+bool
 ManifestLiveboxesParser::OnSizeValue(const char *pCharacters)
 {
+       if( IsValidSize(pCharacters) == false)
+       {
+               AppLog("  <Size>%s</Size> <-- The size isn't supported by native c++ app widget, so ignored.", pCharacters);
+               return true;
+       }
+
        ManifestHandler* pHandler = GetHandler();
        TryReturn(pHandler, false, "pHandler is null");