From: everLEEst(SangHyeon Lee) Date: Fri, 7 Mar 2025 04:26:31 +0000 (+0900) Subject: Revert "[NUI] add asynchronous tasked animation play" X-Git-Tag: submit/tizen/20250312.043201~1^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad679d73bcbcaa95bad9d474c410da2ed7c956bf;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Revert "[NUI] add asynchronous tasked animation play" This reverts commit c9cb5922a4eb67ea5b632ee3285256b9e66bd1ea. --- diff --git a/src/Tizen.NUI/src/public/Animation/Animation.cs b/src/Tizen.NUI/src/public/Animation/Animation.cs index 2325fdaee..308560b12 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 @@ 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); } - /// - /// 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)