From 47addab4471b3256b0dd26973abf3f6d80487365 Mon Sep 17 00:00:00 2001 From: Fabian Lange Date: Wed, 12 Jun 2013 15:44:46 +0200 Subject: Adding isIOs and isAndroid to the WebBrowser wrapper around VBrowserDetails (#11168) The information is available from VBrowser and just not exposed via WebBrowser (while isLinux, isMacOSX and isWindows are). Change-Id: I2fd6133f404cb3e1b4fadb93075fda012f70adb6 --- server/src/com/vaadin/server/WebBrowser.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'server') diff --git a/server/src/com/vaadin/server/WebBrowser.java b/server/src/com/vaadin/server/WebBrowser.java index 8038bbc207..4d1027f0e4 100644 --- a/server/src/com/vaadin/server/WebBrowser.java +++ b/server/src/com/vaadin/server/WebBrowser.java @@ -258,6 +258,26 @@ public class WebBrowser implements Serializable { return browserDetails.isWindows(); } + /** + * Tests if the browser is run on Android. + * + * @return true if run on Android false if the user is not using Android or + * if no information on the browser is present + */ + public boolean isAndroid() { + return browserDetails.isAndroid(); + } + + /** + * Tests if the browser is run in iOS. + * + * @return true if run in iOS false if the user is not using iOS or if no + * information on the browser is present + */ + public boolean isIOS() { + return browserDetails.isIOS(); + } + /** * Returns the browser-reported TimeZone offset in milliseconds from GMT. * This includes possible daylight saving adjustments, to figure out which -- cgit v1.2.3