diff options
author | changhyun1.lee <changhyun1.lee@samsung.com> | 2013-09-23 13:49:45 +0900 |
---|---|---|
committer | changhyun1.lee <changhyun1.lee@samsung.com> | 2013-09-23 13:49:45 +0900 |
commit | 92677cbcd0b1794cd6411cc560960098fb03d8ef (patch) | |
tree | 5ff145a97e31781595ef37c23cc7b9f82c8d46fa /org.tizen.common | |
parent | 1a89f64890c869dfa4634fd18004d6019d597bb4 (diff) | |
download | common-eplugin-92677cbcd0b1794cd6411cc560960098fb03d8ef.tar.gz common-eplugin-92677cbcd0b1794cd6411cc560960098fb03d8ef.tar.bz2 common-eplugin-92677cbcd0b1794cd6411cc560960098fb03d8ef.zip |
[Title] Added screen.size feature validation
[Desc.]
[Issue] Redmine-10227
Change-Id: I487bea50bbee4aea89d6571a3ffb23a1a607c5c1
Diffstat (limited to 'org.tizen.common')
-rw-r--r-- | org.tizen.common/src/org/tizen/common/util/ValidationUtil.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/org.tizen.common/src/org/tizen/common/util/ValidationUtil.java b/org.tizen.common/src/org/tizen/common/util/ValidationUtil.java index 73390f4ad..dce22fa02 100644 --- a/org.tizen.common/src/org/tizen/common/util/ValidationUtil.java +++ b/org.tizen.common/src/org/tizen/common/util/ValidationUtil.java @@ -65,6 +65,9 @@ public class ValidationUtil { public static final String WIDGET_ICON_FILE_EXTENSIONS[] = { ".png", ".gif", ".jpg", ".svg", ".ico" }; // http://www.w3.org/TR/widgets/#default-icons public static final String WIDGET_ICON_FILTER_EXTENSIONS[] = { "*.png;*.gif;*.jpg;*.svg;*.ico;" }; //http://www.w3.org/TR/widgets/#default-icons + public static final String WARNING_SCREENSIZE_FEATURES[] = { "http://tizen.org/feature/screen.size.all", + "http://tizen.org/feature/screen.size.normal" }; + /** * Checking for Email address. RFC 2822 (simplified)Matches a normal email address. Does not check the top-level domain. * @@ -166,7 +169,7 @@ public class ValidationUtil { * @return {@code true} if icon file extension is valid extension */ public static boolean checkForWidgetIconFileExtension( String iconFileName ) { - return ValidationUtil.checkForFileExtension( iconFileName, WIDGET_ICON_FILE_EXTENSIONS ); + return checkForFileExtension( iconFileName, WIDGET_ICON_FILE_EXTENSIONS ); } /** @@ -176,7 +179,22 @@ public class ValidationUtil { * @return {@code true} if content file extension is valid extension */ public static boolean checkForWidgetContentFileExtension( String contentFileName ) { - return ValidationUtil.checkForFileExtension( contentFileName, WIDGET_CONTENT_FILE_EXTENSIONS ); + return checkForFileExtension( contentFileName, WIDGET_CONTENT_FILE_EXTENSIONS ); + } + + /** + * Checking for warning screen.size feature + * + * @param feature name + * @return {@code true} if featurename contained warning feature list + */ + public static boolean checkForWarningFeature( String featureName ) { + for ( String feature : WARNING_SCREENSIZE_FEATURES ) { + if ( feature.equalsIgnoreCase( featureName ) ) { + return true; + } + } + return false; } } |