From 444533838a64aaeb1b9c77e534b166440546fe87 Mon Sep 17 00:00:00 2001 From: Sergey Budkin Date: Fri, 7 Nov 2014 15:22:24 +0200 Subject: VBrowserDetails fails to detect Android when using Firefox (#15183) Changed detection logic. Change-Id: I9cb8e94fe6bb5be587fa73ed6a71d2c7c1d91733 --- shared/src/com/vaadin/shared/VBrowserDetails.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'shared/src/com') diff --git a/shared/src/com/vaadin/shared/VBrowserDetails.java b/shared/src/com/vaadin/shared/VBrowserDetails.java index fa21bddc96..6e45d33e16 100644 --- a/shared/src/com/vaadin/shared/VBrowserDetails.java +++ b/shared/src/com/vaadin/shared/VBrowserDetails.java @@ -167,14 +167,11 @@ public class VBrowserDetails implements Serializable { if (userAgent.contains("windows ")) { os = OperatingSystem.WINDOWS; isWindowsPhone = userAgent.contains("windows phone"); + } else if (userAgent.contains("android")) { + os = OperatingSystem.ANDROID; + parseAndroidVersion(userAgent); } else if (userAgent.contains("linux")) { - if (userAgent.contains("android")) { - os = OperatingSystem.ANDROID; - parseAndroidVersion(userAgent); - } else { - os = OperatingSystem.LINUX; - - } + os = OperatingSystem.LINUX; } else if (userAgent.contains("macintosh") || userAgent.contains("mac osx") || userAgent.contains("mac os x")) { -- cgit v1.2.3