From 28203394af2bd4b1256275eb9e6ffa6c3ec49526 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Wed, 30 Aug 2017 22:25:30 +0900 Subject: [PATCH] [Tizen] add DisableAnimation environment variable Change-Id: I337fc1b0fe90230253f78d850de935d6b70359ae Signed-off-by: dongsug.song --- Tizen.NUI/src/public/Animation.cs | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Tizen.NUI/src/public/Animation.cs b/Tizen.NUI/src/public/Animation.cs index 6bdfc08..422e0ad 100755 --- a/Tizen.NUI/src/public/Animation.cs +++ b/Tizen.NUI/src/public/Animation.cs @@ -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; + } + } + /// /// Plays the animation. /// @@ -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); } /// -- 2.7.4