You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/12/16 09:46:12 UTC

git commit: [flex-sdk] [refs/heads/release4.14.0] - Add ability to use legacy mobile theme. Fixes https://issues.apache.org/jira/browse/FLEX-34685

Repository: flex-sdk
Updated Branches:
  refs/heads/release4.14.0 cea2047cc -> 652ac9d1f


Add ability to use legacy mobile theme.
Fixes https://issues.apache.org/jira/browse/FLEX-34685


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/652ac9d1
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/652ac9d1
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/652ac9d1

Branch: refs/heads/release4.14.0
Commit: 652ac9d1f4381494f817c92dada6021c796fd799
Parents: cea2047
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Mon Dec 15 16:18:58 2014 -0800
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Tue Dec 16 09:45:47 2014 +0100

----------------------------------------------------------------------
 .../projects/framework/src/FrameworkClasses.as  |  1 +
 .../src/mx/utils/LegacyMobileThemeOverride.as   | 47 ++++++++++++++++++++
 2 files changed, 48 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/652ac9d1/frameworks/projects/framework/src/FrameworkClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/FrameworkClasses.as b/frameworks/projects/framework/src/FrameworkClasses.as
index 51e1c64..bb622d3 100644
--- a/frameworks/projects/framework/src/FrameworkClasses.as
+++ b/frameworks/projects/framework/src/FrameworkClasses.as
@@ -165,6 +165,7 @@ internal class FrameworkClasses
     import mx.utils.GetTimerUtil; GetTimerUtil;
     import mx.utils.HSBColor; HSBColor;
 	import mx.utils.IOSPlatformVersionOverride; IOSPlatformVersionOverride;
+	import mx.utils.LegacyMobileThemeOverride; LegacyMobileThemeOverride;
     import mx.utils.LinkedList; LinkedList;
 	import mx.utils.LinkedListNode; LinkedListNode;
 	import mx.utils.OnDemandEventDispatcher; OnDemandEventDispatcher;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/652ac9d1/frameworks/projects/framework/src/mx/utils/LegacyMobileThemeOverride.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/utils/LegacyMobileThemeOverride.as b/frameworks/projects/framework/src/mx/utils/LegacyMobileThemeOverride.as
new file mode 100644
index 0000000..31e1621
--- /dev/null
+++ b/frameworks/projects/framework/src/mx/utils/LegacyMobileThemeOverride.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.utils
+{
+	
+	import flash.display.DisplayObject;
+	import flash.system.Capabilities;
+	
+	import mx.core.mx_internal;
+
+	[Mixin]
+	/**
+	 * Set OS version to older values to force legacy mobile theme
+	 */
+	public class LegacyMobileThemeOverride
+	{
+		public static function init(root:DisplayObject):void
+		{
+			var c:Class = Capabilities;
+			if(c.version.indexOf("AND") > -1)
+			{
+				Platform.mx_internal::androidVersionOverride =  "2.0.0";
+			}
+			else if(c.version.indexOf("IOS") > -1)
+			{
+				Platform.mx_internal::iosVersionOverride =  "6.0.0";
+			}
+		}
+	}
+}
\ No newline at end of file