devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wk...@apache.org
Subject svn commit: r1742853 - in /devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap: DeviceMapClient.java data/UserAgent.java
Date Sun, 08 May 2016 23:55:49 GMT
Author: wkeil
Date: Sun May  8 23:55:49 2016
New Revision: 1742853

URL: http://svn.apache.org/viewvc?rev=1742853&view=rev
Log:
DMAP-92: Investigate IE user agent changes 

Task-Url: https://issues.apache.org/jira/browse/DMAP-92

Modified:
    devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/DeviceMapClient.java
    devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/data/UserAgent.java

Modified: devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/DeviceMapClient.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/DeviceMapClient.java?rev=1742853&r1=1742852&r2=1742853&view=diff
==============================================================================
--- devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/DeviceMapClient.java
(original)
+++ devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/DeviceMapClient.java
Sun May  8 23:55:49 2016
@@ -18,6 +18,9 @@
  */
 package org.apache.devicemap;
 
+import static org.apache.devicemap.data.UserAgent.ANDROID;
+import static org.apache.devicemap.data.UserAgent.WINDOWS;
+
 import java.io.IOException;
 import java.util.*;
 import java.util.logging.Level;
@@ -32,7 +35,7 @@ import org.apache.devicemap.loader.Loade
 
 /**
  * @author Werner Keil
- * @version 1.0.10
+ * @version 1.0.11
  */
 public class DeviceMapClient {
     private static final Logger LOG = Logger.getLogger(DeviceMapClient.class.getName());
@@ -159,9 +162,7 @@ public class DeviceMapClient {
     private static final String DEVICE_OS = "device_os";
     private static final String DEVICE_OS_VERSION = "device_os_version";
     private static final String VENDOR = "vendor";
-    private static final String ANDROID = "Android";
     private static final String LIKE_MAC = "like Mac OS X";
-    private static final String WINDOWS = "Windows";
     
     private DeviceType fixFromUserAgent(final DeviceType device, final UserAgent userAgent)
{
 		String pattern = userAgent.getPatternElementsInside();
@@ -221,10 +222,10 @@ public class DeviceMapClient {
 //							}
 							device.setAttributes(attributes);
 						}
-					} else {
+					} /* else {
 						String versionCandidate = part.trim();
 						System.out.println(versionCandidate);
-					}
+					} */
 				}
 			}
 		}

Modified: devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/data/UserAgent.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/data/UserAgent.java?rev=1742853&r1=1742852&r2=1742853&view=diff
==============================================================================
--- devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/data/UserAgent.java
(original)
+++ devicemap/trunk/clients/1.0/java/client/src/main/java/org/apache/devicemap/data/UserAgent.java
Sun May  8 23:55:49 2016
@@ -1,4 +1,4 @@
-/**
+/*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
  *  distributed with this work for additional information
@@ -22,7 +22,8 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 public class UserAgent {
-	private static final String ANDROID = "Android";
+	public static final String ANDROID = "Android";
+	public static final String WINDOWS = "Windows";
 	
     public static final String MOZILLA_AND_OPERA_PATTERN = "(.*?)((?:Mozilla)|(?:Opera))[/
](\\d+\\.\\d+).*?\\(((?:.*?)(?:.*?\\(.*?\\))*(?:.*?))\\)(.*)";
     public static final int INDEX_MOZILLA_PATTERN_GROUP_PRE = 1;



Mime
View raw message