From: Dongsug Song Date: Sat, 13 Mar 2021 02:10:39 +0000 (+0900) Subject: [NUI] Fix TV TCT fails (2nd) X-Git-Tag: submit/tizen_6.0/20210314.005241~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0eeef17fb8c79910223a298c9819b95974a71525;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix TV TCT fails (2nd) - "#if PROFILE_MOBILE" is not working - Change profile check as ThemeManager.CurrentProfile - TV target has been tested and verified locally --- diff --git a/packaging/csapi-tizenfx.spec b/packaging/csapi-tizenfx.spec index 09ae25c4e..da2ca1fa4 100644 --- a/packaging/csapi-tizenfx.spec +++ b/packaging/csapi-tizenfx.spec @@ -1,7 +1,7 @@ # Auto-generated from csapi-tizenfx.spec.in by makespec.sh %define TIZEN_NET_API_VERSION 8 -%define TIZEN_NET_RPM_VERSION 8.0.0.999+nui21932 +%define TIZEN_NET_RPM_VERSION 8.0.0.999+nui21936 %define TIZEN_NET_NUGET_VERSION 8.0.0.99999 %define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework diff --git a/packaging/version.txt b/packaging/version.txt index 4a92ce94e..30141b009 100755 --- a/packaging/version.txt +++ b/packaging/version.txt @@ -6,4 +6,4 @@ RPM_VERSION=8.0.0.999 NUGET_VERSION=8.0.0.99999 # RPM Version Suffix -RPM_VERSION_SUFFIX=nui21932 +RPM_VERSION_SUFFIX=nui21936 diff --git a/src/Tizen.NUI.Components/Controls/Button.Internal.cs b/src/Tizen.NUI.Components/Controls/Button.Internal.cs index a6c2245ce..b67b88ac7 100755 --- a/src/Tizen.NUI.Components/Controls/Button.Internal.cs +++ b/src/Tizen.NUI.Components/Controls/Button.Internal.cs @@ -362,9 +362,10 @@ namespace Tizen.NUI.Components if (type == DisposeTypes.Explicit) { -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.DeleteAccessibilityAttribute(this); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.DeleteAccessibilityAttribute(this); + } Extension?.OnDispose(this); if (buttonIcon != null) @@ -414,10 +415,12 @@ namespace Tizen.NUI.Components EnableControlStatePropagation = true; UpdateState(); LayoutDirectionChanged += OnLayoutDirectionChanged; -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "Button"); - Feedback = true; -#endif + + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "Button"); + Feedback = true; + } } private void UpdateUIContent() diff --git a/src/Tizen.NUI.Components/Controls/Button.cs b/src/Tizen.NUI.Components/Controls/Button.cs index aeb1652e8..8d59d4427 100755 --- a/src/Tizen.NUI.Components/Controls/Button.cs +++ b/src/Tizen.NUI.Components/Controls/Button.cs @@ -336,9 +336,10 @@ namespace Tizen.NUI.Components internal set { buttonText = value; -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Label, buttonText.Text); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Label, buttonText.Text); + } } } diff --git a/src/Tizen.NUI.Components/Controls/DropDown.cs b/src/Tizen.NUI.Components/Controls/DropDown.cs index 5b1d50fb2..e0ed84d90 100755 --- a/src/Tizen.NUI.Components/Controls/DropDown.cs +++ b/src/Tizen.NUI.Components/Controls/DropDown.cs @@ -141,9 +141,10 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] public DropDown() : base() { -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "DropDown"); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "DropDown"); + } } /// @@ -155,9 +156,10 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] public DropDown(string style) : base(style) { -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "DropDown"); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "DropDown"); + } } /// @@ -169,9 +171,10 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] public DropDown(DropDownStyle dropDownStyle) : base(dropDownStyle) { -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "DropDown"); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "DropDown"); + } } /// diff --git a/src/Tizen.NUI.Components/Controls/Loading.cs b/src/Tizen.NUI.Components/Controls/Loading.cs index 789045ea5..0026d3ad5 100755 --- a/src/Tizen.NUI.Components/Controls/Loading.cs +++ b/src/Tizen.NUI.Components/Controls/Loading.cs @@ -218,9 +218,10 @@ namespace Tizen.NUI.Components //Called by User //Release your own managed resources here. //You should release all of your own disposable objects here. -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.DeleteAccessibilityAttribute(this); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.DeleteAccessibilityAttribute(this); + } RemoveVisual("loadingImageVisual"); } @@ -246,9 +247,10 @@ namespace Tizen.NUI.Components this.AddVisual("loadingImageVisual", imageVisual); -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "Loading"); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "Loading"); + } } private void UpdateVisual() diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index 342ba869b..5c5c09275 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -713,9 +713,10 @@ namespace Tizen.NUI.Components ParentOrigin = NUI.ParentOrigin.BottomCenter, PivotPoint = NUI.PivotPoint.BottomCenter, }; -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "ScrollableBase"); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "ScrollableBase"); + } } private bool OnIterruptTouchingChildTouched(object source, View.TouchEventArgs args) @@ -1010,9 +1011,10 @@ namespace Tizen.NUI.Components if (type == DisposeTypes.Explicit) { -#if (PROFILE_MOBILE) - AccessibilityManager.Instance.DeleteAccessibilityAttribute(this); -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + AccessibilityManager.Instance.DeleteAccessibilityAttribute(this); + } StopVerticalShadowAnimation(); StopScroll(); diff --git a/src/Tizen.NUI.Components/Controls/Switch.cs b/src/Tizen.NUI.Components/Controls/Switch.cs index 05a183406..25d93d67b 100755 --- a/src/Tizen.NUI.Components/Controls/Switch.cs +++ b/src/Tizen.NUI.Components/Controls/Switch.cs @@ -315,9 +315,10 @@ namespace Tizen.NUI.Components private void Initialize() { IsSelectable = true; -#if (PROFILE_MOBILE) - Feedback = true; -#endif + if (ThemeManager.CurrentProfile == ThemeManager.Profile.Mobile) + { + Feedback = true; + } } private void OnSelect() diff --git a/src/Tizen.NUI/src/public/Animation.cs b/src/Tizen.NUI/src/public/Animation.cs index a0c0cd7e4..682f2b43d 100755 --- a/src/Tizen.NUI/src/public/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation.cs @@ -1318,14 +1318,11 @@ namespace Tizen.NUI private void OnFinished(IntPtr data) { - Tizen.Log.Error("NUI", $"[TEMP]OnFinished() START"); if (_animationFinishedEventHandler != null) { //here we send all data to user event handlers _animationFinishedEventHandler(this, null); - Tizen.Log.Error("NUI", $"[TEMP]OnFinished() handler is invoked! should be shown!"); } - Tizen.Log.Error("NUI", $"[TEMP]OnFinished() END"); } private void OnProgressReached(IntPtr data) diff --git a/src/Tizen.NUI/src/public/Theme/ThemeManager.cs b/src/Tizen.NUI/src/public/Theme/ThemeManager.cs index 033e51c18..bc64db5f9 100644 --- a/src/Tizen.NUI/src/public/Theme/ThemeManager.cs +++ b/src/Tizen.NUI/src/public/Theme/ThemeManager.cs @@ -29,7 +29,10 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public static class ThemeManager { - private enum Profile + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public enum Profile { Common = 0, Mobile = 1, @@ -104,7 +107,9 @@ namespace Tizen.NUI internal static bool ThemeApplied => (CurrentTheme.Count > 0 || DefaultTheme.Count > 0); - private static Profile CurrentProfile + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public static Profile CurrentProfile { get {