change return type of get widget list callback (#4633)
authorsukhyungkang <35091460+sukhyungkang@users.noreply.github.com>
Fri, 7 Oct 2022 05:49:05 +0000 (14:49 +0900)
committerGitHub <noreply@github.com>
Fri, 7 Oct 2022 05:49:05 +0000 (14:49 +0900)
Signed-off-by: SukhyungKang <shine.kang@samsung.com>
Signed-off-by: SukhyungKang <shine.kang@samsung.com>
Co-authored-by: hjhun <36876573+hjhun@users.noreply.github.com>
src/Tizen.Applications.WidgetControl/Interop/Interop.WidgetService.cs
src/Tizen.Applications.WidgetControl/Tizen.Applications/WidgetControl.cs

index 74608b1..270e569 100755 (executable)
@@ -59,7 +59,7 @@ internal static partial class Interop
         internal delegate int LifecycleCallback(string widgetId, LifecycleEvent e, string instanceId, IntPtr userData);
 
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        internal delegate void WidgetListCallback(string widgetId, int isPrime, IntPtr userData);
+        internal delegate int WidgetListCallback(string widgetId, int isPrime, IntPtr userData);
 
         [DllImport(Libraries.WidgetService, EntryPoint = "widget_service_get_icon")]
         internal static extern string GetIcon(string pkgId, string lang);
index c6eb9ab..c734da5 100755 (executable)
@@ -284,6 +284,8 @@ namespace Tizen.Applications
             Interop.WidgetService.ErrorCode err = Interop.WidgetService.GetWidgetListByPkgId(pkgId, (widgetId, isPrime, userData) =>
             {
                 list.Add(new WidgetControl(widgetId));
+
+                return (int)Interop.WidgetService.ErrorCode.None;
             }, IntPtr.Zero);
 
             switch (err)
@@ -323,6 +325,8 @@ namespace Tizen.Applications
             Interop.WidgetService.ErrorCode err = Interop.WidgetService.GetWidgetListByPkgId(pkgId, (widgetId, isPrime, userData) =>
             {
                 list.Add(widgetId);
+
+                return (int)Interop.WidgetService.ErrorCode.None;
             }, IntPtr.Zero);
 
             switch (err)