[NUI] Fix TV TCT fails (2nd)
authorDongsug Song <dongsug.song@samsung.com>
Sat, 13 Mar 2021 02:10:39 +0000 (11:10 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Sat, 13 Mar 2021 02:35:36 +0000 (11:35 +0900)
- "#if PROFILE_MOBILE" is not working
- Change profile check as ThemeManager.CurrentProfile
- TV target has been tested and verified locally

packaging/csapi-tizenfx.spec
packaging/version.txt
src/Tizen.NUI.Components/Controls/Button.Internal.cs
src/Tizen.NUI.Components/Controls/Button.cs
src/Tizen.NUI.Components/Controls/DropDown.cs
src/Tizen.NUI.Components/Controls/Loading.cs
src/Tizen.NUI.Components/Controls/ScrollableBase.cs
src/Tizen.NUI.Components/Controls/Switch.cs
src/Tizen.NUI/src/public/Animation.cs
src/Tizen.NUI/src/public/Theme/ThemeManager.cs

index 09ae25c4e15664328fb0aec82b88b6772f44f3a1..da2ca1fa4ae512148569966f151b3d5cda810e7b 100644 (file)
@@ -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
index 4a92ce94e3ba6af3e31c62bf75473aed4a980e94..30141b0092da51b7220d522bda750293ceb289b3 100755 (executable)
@@ -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
index a6c2245ce38306359b717ec26c3240f73b2f5c39..b67b88ac7063e3b6b8107ada31bbbc133f3baa11 100755 (executable)
@@ -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()
index aeb1652e8a40bb3d6e6b716ea2035159e6db26c0..8d59d4427ab1025cd75e0ae06efe4a262f2b940f 100755 (executable)
@@ -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);
+                }
             }
         }
 
index 5b1d50fb20fde3726a56fd0c40225f131fe5402d..e0ed84d90879d54f6269eb9c7dbb4471236c384a 100755 (executable)
@@ -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");
+            }
         }
 
         /// <summary>
@@ -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");
+            }
         }
 
         /// <summary>
@@ -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");
+            }
         }
 
         /// <summary>
index 789045ea5faaf32bff505eb37f665b3f8987f987..0026d3ad546fe206320f8e1cb10af611d40d91d1 100755 (executable)
@@ -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()
index 342ba869b4250a3284ff639acf915e09c591f9ab..5c5c0927562c36dee9c6aebc323118db4581f2e3 100755 (executable)
@@ -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();
 
index 05a183406b3d01e1a64ef56b1068cd7d4b5abf5e..25d93d67b95337c68d9ddeba3ff67644e3b54e2b 100755 (executable)
@@ -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()
index a0c0cd7e48c83a01b0d8044f437ee7e2786dccbd..682f2b43de2659f1caf1c9ec2a0bdb9e3b21fba9 100755 (executable)
@@ -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)
index 033e51c185639446dc833971015c0caf69df6d8e..bc64db5f9e894bcffb0c658fb249d893d1e039d8 100644 (file)
@@ -29,7 +29,10 @@ namespace Tizen.NUI
     [EditorBrowsable(EditorBrowsableState.Never)]
     public static class ThemeManager
     {
-        private enum Profile
+
+        /// <summary></summary>
+        [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
+        /// <summary></summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Profile CurrentProfile
         {
             get
             {