From 709f35aca0f445444c8052015e34113e567a3166 Mon Sep 17 00:00:00 2001 From: Denis Anisimov Date: Sun, 7 Sep 2014 16:33:30 +0300 Subject: isIPad() and isIPhone() methods are added to WebBrowser (#14424,#14423). Change-Id: I7b3556d5f9c1dd84beec638d7fbff1c5382070a4 --- server/src/com/vaadin/server/WebBrowser.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'server/src/com') diff --git a/server/src/com/vaadin/server/WebBrowser.java b/server/src/com/vaadin/server/WebBrowser.java index 17ba6756b8..cb5979d612 100644 --- a/server/src/com/vaadin/server/WebBrowser.java +++ b/server/src/com/vaadin/server/WebBrowser.java @@ -290,6 +290,26 @@ public class WebBrowser implements Serializable { return browserDetails.isIOS(); } + /** + * Tests if the browser is run on IPhone. + * + * @return true if run on IPhone false if the user is not using IPhone or if + * no information on the browser is present + */ + public boolean isIPhone() { + return browserDetails.isIPhone(); + } + + /** + * Tests if the browser is run on IPad. + * + * @return true if run on IPad false if the user is not using IPad or if no + * information on the browser is present + */ + public boolean isIPad() { + return browserDetails.isIPad(); + } + /** * Returns the browser-reported TimeZone offset in milliseconds from GMT. * This includes possible daylight saving adjustments, to figure out which -- cgit v1.2.3