You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/04/25 05:08:20 UTC
[4/5] git commit: [flex-sdk] - Added support for 480 dpi
Added support for 480 dpi
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/d26f25b8
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/d26f25b8
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/d26f25b8
Branch: refs/heads/480dpi
Commit: d26f25b820e95b7d28ae484d4f67611cce14439c
Parents: f3482b2
Author: Justin Mclean <jm...@apache.org>
Authored: Thu Apr 25 13:06:23 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Thu Apr 25 13:06:23 2013 +1000
----------------------------------------------------------------------
mustella/java/src/mustella/MobileConfigWriter.java | 2 +-
mustella/java/src/utils/MobileUtil.java | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d26f25b8/mustella/java/src/mustella/MobileConfigWriter.java
----------------------------------------------------------------------
diff --git a/mustella/java/src/mustella/MobileConfigWriter.java b/mustella/java/src/mustella/MobileConfigWriter.java
index 451c948..192eb54 100644
--- a/mustella/java/src/mustella/MobileConfigWriter.java
+++ b/mustella/java/src/mustella/MobileConfigWriter.java
@@ -162,7 +162,7 @@ public class MobileConfigWriter {
ret += " UnitTester.cv.targetOS = \"" + target_os + "\";\n";
ret += " UnitTester.cv.osVersion = \"" + os_version + "\";\n";
- // If device, get the proper dpi bucket (160/240/320) for the device.
+ // If device, get the proper dpi bucket (160/240/320/480) for the device.
if( (target_os.compareToIgnoreCase(MobileUtil.MAC) == 0) || (target_os.compareToIgnoreCase(MobileUtil.WIN) == 0) ){
if( adl_extras_XscreenDPI == -1 ){
ret += " UnitTester.cv.deviceDensity = flash.system.Capabilities.screenDPI;\n";
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d26f25b8/mustella/java/src/utils/MobileUtil.java
----------------------------------------------------------------------
diff --git a/mustella/java/src/utils/MobileUtil.java b/mustella/java/src/utils/MobileUtil.java
index ab8d6be..bf522a2 100644
--- a/mustella/java/src/utils/MobileUtil.java
+++ b/mustella/java/src/utils/MobileUtil.java
@@ -70,6 +70,7 @@ public class MobileUtil {
public static final String[] DEVICES_AROUND_160PPI = {WIN, DROID_PRO, ANDROID_TABLET, XOOM, IPOD_TOUCH_3GS, IPAD, IPAD2, PLAYBOOK};
public static final String[] DEVICES_AROUND_240PPI = {ANDROID, ANDROID2, DESIRE, DROID, DROID_2, DROID_X, NEXUS_ONE, EVO, INCREDIBLE};
public static final String[] DEVICES_AROUND_320PPI = {WIN, IPOD_TOUCH_4G, IPOD_TOUCH_5G, IPAD3, IPAD4};
+ public static final String[] DEVICES_AROUND_480PPI = {};
// Other
public static final String MOBILE_FRAMEWORK_DIR = "MobileConfig";
@@ -300,6 +301,11 @@ public class MobileUtil {
if( deviceId.compareToIgnoreCase( DEVICES_AROUND_320PPI[ i ] ) == 0 )
ret = 320;
}
+
+ for( i = 0; i < Array.getLength( DEVICES_AROUND_480PPI ); ++i ){
+ if( deviceId.compareToIgnoreCase( DEVICES_AROUND_480PPI[ i ] ) == 0 )
+ ret = 480;
+ }
return ret;
/**