Updated Branches: refs/heads/release4.12.0 86bbf0d7f -> 195b7a78c
changed to only check screen dimensions when on an iPad Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/5bbcb899 Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/5bbcb899 Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/5bbcb899 Branch: refs/heads/release4.12.0 Commit: 5bbcb899c139d731ea44c48f6a5f225f515589f5 Parents: d481fbc Author: Justin Mclean <[email protected]> Authored: Sat Feb 8 15:56:13 2014 +1100 Committer: Justin Mclean <[email protected]> Committed: Sat Feb 8 15:56:13 2014 +1100 ---------------------------------------------------------------------- .../framework/src/mx/core/RuntimeDPIProvider.as | 4 ++-- .../projects/framework/src/mx/utils/Platform.as | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5bbcb899/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as b/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as index d9b7e50..48d9ee9 100644 --- a/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as +++ b/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as @@ -119,10 +119,10 @@ public class RuntimeDPIProvider public function get runtimeDPI():Number { - var isIOS:Boolean = Platform.isIOS; + var isIPad:Boolean = Platform.isIPad; var screenDPI:Number = Capabilities.screenDPI; - if (isIOS) + if (isIPad) { var root:DisplayObject = SystemManager.getSWFRoot(this); if (root != null ) { http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/5bbcb899/frameworks/projects/framework/src/mx/utils/Platform.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/framework/src/mx/utils/Platform.as b/frameworks/projects/framework/src/mx/utils/Platform.as index 8c9d65f..6c89078 100644 --- a/frameworks/projects/framework/src/mx/utils/Platform.as +++ b/frameworks/projects/framework/src/mx/utils/Platform.as @@ -38,6 +38,7 @@ public class Platform protected static var _initilised:Boolean; protected static var _isAndroid:Boolean; protected static var _isIOS:Boolean; + protected static var _isIPad:Boolean; protected static var _isBlackBerry:Boolean; protected static var _isMobile:Boolean; protected static var _isMac:Boolean; @@ -63,6 +64,21 @@ public class Platform } /** + * Returns true if the applciation is runing on an iPad. + * + * @langversion 3.0 + * @playerversion Flash 10 + * @playerversion AIR 2.0 + * @productversion Flex 4.12 + */ + public static function get isIPad():Boolean + { + getPlatforms(); + + return _isIPad; + } + + /** * Returns true if the applciation is runing on a BlackBerry. * * @langversion 3.0 @@ -208,6 +224,7 @@ public class Platform _isMac = Capabilities.os.indexOf("Mac OS") != -1; _isWindows = Capabilities.os.indexOf("Windows") != -1; _isLinux = Capabilities.os.indexOf("Linux") != -1; // note that Android is also Linux + _isIPad = Capabilities.os.indexOf('iPad') > -1; _isDesktop = !_isMobile; _isAir = Capabilities.playerType == "Desktop";
