Revert "[NUI] fix the defect that the focus of VitualRemote App is stuck very rarely"
authordongsug.song <dongsug.song@samsung.com>
Thu, 15 Dec 2022 02:03:12 +0000 (11:03 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Thu, 15 Dec 2022 12:18:31 +0000 (21:18 +0900)
This reverts commit 0017dd0e49ffbc78d8c51c6f068afd6e8fdbc8d0.

src/Tizen.NUI/src/internal/Common/Registry.cs
src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs

index 4cefbb0..ecceb81 100755 (executable)
@@ -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
             {
index c162a70..9c0e4b9 100755 (executable)
@@ -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;
             }
         }