Revert "[NUI] add asynchronous tasked animation play"
authoreverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Fri, 7 Mar 2025 04:26:31 +0000 (13:26 +0900)
committerWonsik Jung <sidein@samsung.com>
Wed, 12 Mar 2025 04:26:52 +0000 (13:26 +0900)
This reverts commit c9cb5922a4eb67ea5b632ee3285256b9e66bd1ea.

src/Tizen.NUI/src/public/Animation/Animation.cs

index 2325fdaee484523937d7eef38531dbb674d47b9c..308560b121e1215eb0b0857a3140c760b2ebb68c 100755 (executable)
@@ -25,8 +25,6 @@ namespace Tizen.NUI
     using System.Reflection;
     using System.Globalization;
     using System.Diagnostics.CodeAnalysis;
-    using System.Threading;
-    using System.Threading.Tasks;
 
     using Tizen.NUI.BaseComponents;
 
@@ -63,7 +61,6 @@ namespace Tizen.NUI
         private System.IntPtr finishedCallbackOfNative;
 
         private AnimationProgressReachedEventCallbackType animationProgressReachedEventCallback;
-        private TaskCompletionSource animationTaskCompletionSource;
 
         private string[] properties = null;
         private string[] destValue = null;
@@ -1351,13 +1348,6 @@ namespace Tizen.NUI
         {
             Interop.Animation.Clear(SwigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
-            if (animationTaskCompletionSource != null)
-            {
-                animationTaskCompletionSource.SetCanceled();
-                animationTaskCompletionSource = null;
-            }
-
         }
 
         internal object ConvertTo(object value, Type toType)
@@ -1375,33 +1365,6 @@ namespace Tizen.NUI
             return ConvertTo(value, toType, getConverter);
         }
 
-        /// <summary>
-        /// Plays the animation asynchronously.
-        /// </summary>
-        /// <returns>A Task that completes when the animation finishes.</returns>
-        internal Task PlayAsync()
-        {
-            if (DisableAnimation)
-            {
-                return Task.FromCanceled(CancellationToken.None);
-            }
-
-            if (animationTaskCompletionSource != null)
-            {
-                animationTaskCompletionSource.SetCanceled();
-            }
-            animationTaskCompletionSource = new TaskCompletionSource();
-            void finished(object sender, EventArgs e)
-            {
-                Finished -= finished;
-                animationTaskCompletionSource.SetResult();
-                animationTaskCompletionSource = null;
-            }
-            Finished += finished;
-            Play();
-            return animationTaskCompletionSource.Task;
-        }
-
         internal object ConvertTo(object value, Type toType, Func<object> getConverter)
         {
             if (value == null)