[Tizen] add DisableAnimation environment variable 05/146805/2
authordongsug.song <dongsug.song@samsung.com>
Wed, 30 Aug 2017 13:25:30 +0000 (22:25 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Fri, 1 Sep 2017 00:34:24 +0000 (09:34 +0900)
Change-Id: I337fc1b0fe90230253f78d850de935d6b70359ae
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
Tizen.NUI/src/public/Animation.cs

index 6bdfc08..422e0ad 100755 (executable)
@@ -889,6 +889,23 @@ namespace Tizen.NUI
             return ret;
         }
 
+        private static bool? disableAnimation = null;
+        private bool DisableAnimation
+        {
+            get
+            {
+                if (disableAnimation.HasValue == false)
+                {
+                    string type = Environment.GetEnvironmentVariable("PlatformSmartType");
+                    if (type == "Entry")
+                        disableAnimation = true;
+                    else
+                        disableAnimation = false;
+                }
+                return disableAnimation.Value;
+            }
+        }
+
         /// <summary>
         /// Plays the animation.
         /// </summary>
@@ -896,9 +913,9 @@ namespace Tizen.NUI
         {
             NDalicPINVOKE.Animation_Play(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-#if DISABLE_ANIMATION
-            Stop(EndActions.StopFinal);
-#endif
+
+            if (DisableAnimation == true)
+                Stop(EndActions.StopFinal);
         }
 
         /// <summary>