From: Dongsug Song Date: Fri, 12 Mar 2021 12:58:15 +0000 (+0900) Subject: [NUI] Fix TV TCT fails X-Git-Tag: submit/tizen_6.0/20210314.005241~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f45d5c6774683c40583cdd1b17cf8d61e14c69d3;hp=4c7e95f69de712cfba61e3a765a7f72c8e911607;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix TV TCT fails - FeedKey and Accessibility are FHUB(mobile) feature - TV doesn't use Feedkey nor NUI Accessibility - Need to be seperated by profile when building --- diff --git a/src/Tizen.NUI.Components/Controls/Button.Internal.cs b/src/Tizen.NUI.Components/Controls/Button.Internal.cs index 60e3fae..a6c2245 100755 --- a/src/Tizen.NUI.Components/Controls/Button.Internal.cs +++ b/src/Tizen.NUI.Components/Controls/Button.Internal.cs @@ -362,7 +362,9 @@ namespace Tizen.NUI.Components if (type == DisposeTypes.Explicit) { +#if (PROFILE_MOBILE) AccessibilityManager.Instance.DeleteAccessibilityAttribute(this); +#endif Extension?.OnDispose(this); if (buttonIcon != null) @@ -412,10 +414,10 @@ namespace Tizen.NUI.Components EnableControlStatePropagation = true; UpdateState(); LayoutDirectionChanged += OnLayoutDirectionChanged; - +#if (PROFILE_MOBILE) AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "Button"); - Feedback = true; +#endif } private void UpdateUIContent() diff --git a/src/Tizen.NUI.Components/Controls/Button.cs b/src/Tizen.NUI.Components/Controls/Button.cs index 27e8f22..aeb1652 100755 --- a/src/Tizen.NUI.Components/Controls/Button.cs +++ b/src/Tizen.NUI.Components/Controls/Button.cs @@ -336,7 +336,9 @@ namespace Tizen.NUI.Components internal set { buttonText = value; +#if (PROFILE_MOBILE) AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Label, buttonText.Text); +#endif } } diff --git a/src/Tizen.NUI.Components/Controls/DropDown.cs b/src/Tizen.NUI.Components/Controls/DropDown.cs index e9c3a56..5b1d50f 100755 --- a/src/Tizen.NUI.Components/Controls/DropDown.cs +++ b/src/Tizen.NUI.Components/Controls/DropDown.cs @@ -141,7 +141,9 @@ namespace Tizen.NUI.Components [EditorBrowsable(EditorBrowsableState.Never)] public DropDown() : base() { +#if (PROFILE_MOBILE) AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "DropDown"); +#endif } /// @@ -153,7 +155,9 @@ 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 } /// @@ -165,7 +169,9 @@ 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 } /// diff --git a/src/Tizen.NUI.Components/Controls/Loading.cs b/src/Tizen.NUI.Components/Controls/Loading.cs index 55461b7..789045e 100755 --- a/src/Tizen.NUI.Components/Controls/Loading.cs +++ b/src/Tizen.NUI.Components/Controls/Loading.cs @@ -218,7 +218,9 @@ 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 RemoveVisual("loadingImageVisual"); } @@ -244,7 +246,9 @@ namespace Tizen.NUI.Components this.AddVisual("loadingImageVisual", imageVisual); +#if (PROFILE_MOBILE) AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "Loading"); +#endif } private void UpdateVisual() diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index d949176..342ba86 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -713,8 +713,9 @@ namespace Tizen.NUI.Components ParentOrigin = NUI.ParentOrigin.BottomCenter, PivotPoint = NUI.PivotPoint.BottomCenter, }; - +#if (PROFILE_MOBILE) AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Trait, "ScrollableBase"); +#endif } private bool OnIterruptTouchingChildTouched(object source, View.TouchEventArgs args) @@ -1009,7 +1010,9 @@ namespace Tizen.NUI.Components if (type == DisposeTypes.Explicit) { +#if (PROFILE_MOBILE) AccessibilityManager.Instance.DeleteAccessibilityAttribute(this); +#endif StopVerticalShadowAnimation(); StopScroll(); diff --git a/src/Tizen.NUI.Components/Controls/Scrollbar.cs b/src/Tizen.NUI.Components/Controls/Scrollbar.cs index abc1a20..716af4b 100755 --- a/src/Tizen.NUI.Components/Controls/Scrollbar.cs +++ b/src/Tizen.NUI.Components/Controls/Scrollbar.cs @@ -485,7 +485,7 @@ namespace Tizen.NUI.Components /// The padding of the track. protected virtual void UpdateTrackPadding(Extents trackPadding) { - if (calculator == null) + if (calculator == null || trackVisual == null || thumbVisual == null) { return; } diff --git a/src/Tizen.NUI.Components/Controls/Switch.cs b/src/Tizen.NUI.Components/Controls/Switch.cs index 809cd42..05a1834 100755 --- a/src/Tizen.NUI.Components/Controls/Switch.cs +++ b/src/Tizen.NUI.Components/Controls/Switch.cs @@ -315,7 +315,9 @@ namespace Tizen.NUI.Components private void Initialize() { IsSelectable = true; +#if (PROFILE_MOBILE) Feedback = true; +#endif } private void OnSelect()