From a53d22d7666f2b5bafdab1e029a6e76751430015 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Thu, 15 Dec 2022 11:03:12 +0900 Subject: [PATCH] Revert "[NUI] fix the defect that the focus of VitualRemote App is stuck very rarely" This reverts commit 0017dd0e49ffbc78d8c51c6f068afd6e8fdbc8d0. --- src/Tizen.NUI/src/internal/Common/Registry.cs | 46 ++-------------------- .../public/BaseComponents/LottieAnimationView.cs | 2 +- 2 files changed, 4 insertions(+), 44 deletions(-) diff --git a/src/Tizen.NUI/src/internal/Common/Registry.cs b/src/Tizen.NUI/src/internal/Common/Registry.cs index 4cefbb0..ecceb81 100755 --- a/src/Tizen.NUI/src/internal/Common/Registry.cs +++ b/src/Tizen.NUI/src/internal/Common/Registry.cs @@ -58,49 +58,9 @@ namespace Tizen.NUI RegistryCurrentThreadCheck(); - if (baseHandle == null) + if (Instance._controlMap.TryAdd(refCptr, new WeakReference(baseHandle, false)) != true) { - Tizen.Log.Info("NUI", $"Register() baseHandle == null, refCptr(key)={refCptr.ToString("X8")} just return!"); - return; - } - - if (baseHandle.HasBody() == false) - { - Tizen.Log.Info("NUI", $"HasBody() == false, just reture here!"); - return; - } - - const int retryCount = 3; - for (int i = 0; i < retryCount; i++) - { - if (Instance._controlMap.TryAdd(refCptr, new WeakReference(baseHandle, false))) - { - break; - } - else - { - Tizen.Log.Info("NUI", $"refCptr is already exist! OR something wrong! couldn't add, refCptr(key)={refCptr.ToString("X8")}"); - WeakReference wr; - if (Instance._controlMap.TryGetValue(refCptr, out wr)) - { - if (wr?.Target == null) - { - Tizen.Log.Info("NUI", $"wr?.Target == null!"); - if (Instance._controlMap.TryRemove(refCptr, out wr)) - { - Tizen.Log.Info("NUI", $"remove OK"); - } - } - else - { - BaseHandle bh = wr?.Target as BaseHandle; - if (bh != null) - { - Tizen.Log.Info("NUI", $"bh.Disposed={bh.Disposed} IsDisposeQueued={bh.IsDisposeQueued} type={bh.GetType()}"); - } - } - } - } + NUILog.Debug("refCptr is already exist! OR something wrong!"); } NUILog.Debug($"[Registry] Register! type:{baseHandle.GetType()} count:{Instance._controlMap.Count} copyNativeHandle:{baseHandle.GetBaseHandleCPtrHandleRef.Handle.ToString("X8")}"); @@ -147,7 +107,7 @@ namespace Tizen.NUI if (refObjectPtr == global::System.IntPtr.Zero) { NUILog.Debug("Registry refObjectPtr is NULL! This means bind native object is NULL!"); - return null; + //return null; } else { diff --git a/src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs b/src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs index c162a70..9c0e4b9 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs @@ -176,7 +176,7 @@ namespace Tizen.NUI.BaseComponents } } } - //Tizen.Log.Info(tag, $" [ERROR][{GetId()}](LottieAnimationView) Fail to get URL from dali >"); + Tizen.Log.Error(tag, $" [ERROR][{GetId()}](LottieAnimationView) Fail to get URL from dali >"); return ret; } } -- 2.7.4