filter unsupported size(4x3) 59/14859/1
authorkyeongwoo.lee <kyeongwoo.lee@samsung.com>
Thu, 5 Dec 2013 10:32:35 +0000 (19:32 +0900)
committerKeebong <keebong.bahn@samsung.com>
Mon, 13 Jan 2014 09:04:06 +0000 (18:04 +0900)
Change-Id: I6191ff3e27f2cc79ac1de51b338c71a8b0a802ad
Signed-off-by: kyeongwoo.lee <kyeongwoo.lee@samsung.com>
src/FShell_AppWidgetProviderInfoImpl.cpp

index f206eb4..bc46cf8 100644 (file)
@@ -137,14 +137,25 @@ _AppWidgetProviderInfoImpl::IsValidSize(const AppId& appId, int w, int h)
                        return false;
                }
        }
-
-       // check base size
-       int unitWidth = w / UNIT_SIZE_BASE;
-       int recalc = UNIT_SIZE_BASE * unitWidth + 4*(unitWidth - 1);
-       if (recalc != w)
+       else
        {
-               SysLog(NID_SHELL, "%dx%d size is invalid.", w, h);
-               return false;
+               static const int UNIT_SIZE_3 = 533;
+
+               // check 4x3 size
+               if (h == UNIT_SIZE_3)
+               {
+                       SysLog(NID_SHELL, "%dx%d size is invalid.", w, h);
+                       return false;
+               }
+
+               // check easy mode size
+               int unitWidth = w / UNIT_SIZE_BASE;
+               int recalc = UNIT_SIZE_BASE * unitWidth + 4*(unitWidth - 1);
+               if (recalc != w)
+               {
+                       SysLog(NID_SHELL, "%dx%d size is invalid.", w, h);
+                       return false;
+               }
        }
 
        return true;