From 3711fcb030411ca62eeba5f49b6da3b325cac5e3 Mon Sep 17 00:00:00 2001 From: "everLEEst(SangHyeon Lee)" Date: Fri, 7 Mar 2025 13:26:31 +0900 Subject: [PATCH] Revert "[NUI] add asynchronous tasked animation play" This reverts commit c9cb5922a4eb67ea5b632ee3285256b9e66bd1ea. --- .../src/public/Animation/Animation.cs | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/Tizen.NUI/src/public/Animation/Animation.cs b/src/Tizen.NUI/src/public/Animation/Animation.cs index 2325fdaee48..308560b121e 100755 --- a/src/Tizen.NUI/src/public/Animation/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation/Animation.cs @@ -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 @@ public class Animation : BaseHandle private System.IntPtr finishedCallbackOfNative; private AnimationProgressReachedEventCallbackType animationProgressReachedEventCallback; - private TaskCompletionSource animationTaskCompletionSource; private string[] properties = null; private string[] destValue = null; @@ -1351,13 +1348,6 @@ public void Clear() { 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 @@ internal object ConvertTo(object value, Type toType) return ConvertTo(value, toType, getConverter); } - /// - /// Plays the animation asynchronously. - /// - /// A Task that completes when the animation finishes. - 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 getConverter) { if (value == null)