myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcoo...@apache.org
Subject svn commit: r956160 - in /myfaces/trinidad/branches/trinidad-1.0.x: trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/
Date Fri, 18 Jun 2010 23:50:54 GMT
Author: mcooper
Date: Fri Jun 18 23:50:54 2010
New Revision: 956160

URL: http://svn.apache.org/viewvc?rev=956160&view=rev
Log:
TRINIDAD-1839 - Agent PLATFORM_IPHONE should detect iPad as well

The "iphone" platform is really the entire "iOS" platform which already included the iPhone
and iPod touch but now also includes iPad.

Modified:
    myfaces/trinidad/branches/trinidad-1.0.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java
    myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
    myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java

Modified: myfaces/trinidad/branches/trinidad-1.0.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.0.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java?rev=956160&r1=956159&r2=956160&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.0.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java
(original)
+++ myfaces/trinidad/branches/trinidad-1.0.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java
Fri Jun 18 23:50:54 2010
@@ -84,7 +84,7 @@ public interface Agent
   public static final String  PLATFORM_MAC = PLATFORM_MACOS;
 
   /**
-   * Constant for iPhone platform
+   * Constant for the iOS (iPhone/iPod touch/iPad) platform
    */
   public static final String  PLATFORM_IPHONE = "iphone";
 

Modified: myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java?rev=956160&r1=956159&r2=956160&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
(original)
+++ myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
Fri Jun 18 23:50:54 2010
@@ -724,11 +724,17 @@ public class AgentFactoryImpl implements
 
     if (agent.indexOf("iPhone") > 0)
     {
+      // iPhone is a member of the iOS platform:
+      agentObj.setPlatform(Agent.PLATFORM_IPHONE);
+    }
+    else if (agent.indexOf("iPad") > 0)
+    {
+      // iPad is a member of the iOS platform:
       agentObj.setPlatform(Agent.PLATFORM_IPHONE);
     }
     else if (agent.indexOf("iPod") > 0)
     {
-      // At the moment, the iPod touch version of this browser matches iPhone's
+      // iPod is a member of the iOS platform:
       agentObj.setPlatform(Agent.PLATFORM_IPHONE);
     }
     else if (agent.indexOf("Win") > 0)

Modified: myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java?rev=956160&r1=956159&r2=956160&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java
(original)
+++ myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java
Fri Jun 18 23:50:54 2010
@@ -376,7 +376,7 @@ public interface TrinidadAgent extends A
   static public final int OS_BLACKBERRY = 7;
 
   /**
-   * OS constant for iPhone
+   * OS constant for all Safari browsers running in the iOS platform (iPhones/iPod/iPad)
    */
   static public final int OS_IPHONE   = 8;
 



Mime
View raw message