Repository: flex-sdk Updated Branches: refs/heads/develop 15e2b6112 -> 188496024
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/18849602 Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/18849602 Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/18849602 Branch: refs/heads/develop Commit: 1884960242f835879f5ca6504659072a2305f120 Parents: 15e2b61 Author: OmPrakash Muppirala <[email protected]> Authored: Mon Dec 15 16:18:58 2014 -0800 Committer: OmPrakash Muppirala <[email protected]> Committed: Mon Dec 15 16:25:40 2014 -0800 ---------------------------------------------------------------------- .../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/18849602/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/18849602/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
