Skip to content

Commit 341046c

Browse files
author
Jay Cho
committed
[Fix] Phase 2: Restore DllImport for WebAuthn MakeCredential/GetAssertion
CRITICAL: The conversion script removed [DllImport] but failed to add [LibraryImport] due to [In]/[In,Out] struct parameters, leaving orphan extern methods without any P/Invoke attribute. This causes EntryPointNotFoundException at runtime — likely root cause of Authenticator.MakeCredential() TCT failure.
1 parent e9449e4 commit 341046c

File tree

35 files changed

+162
-233
lines changed

35 files changed

+162
-233
lines changed

src/Tizen.Applications.Alarm/Interop/Interop.Libraries.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the License);
@@ -21,6 +21,3 @@ internal static partial class Libraries
2121
public const string Alarm = "libcapi-appfw-alarm.so.0";
2222
}
2323
}
24-
25-
26-

src/Tizen.Applications.AttachPanel/Interop/Interop.Libraries.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <summary>
1+
/// <summary>
22
/// The Interoperability support class for the attach panel APIs.
33
/// </summary>
44
internal static partial class Interop
@@ -11,6 +11,3 @@ internal static partial class Libraries
1111
public const string AttachPanel = "libattach-panel.so.0.1.0";
1212
}
1313
}
14-
15-
16-

src/Tizen.Applications.Badge/Interop/Interop.Libraries.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the License);
@@ -21,6 +21,3 @@ internal static partial class Libraries
2121
public const string Badge = "libbadge.so.0";
2222
}
2323
}
24-
25-
26-

src/Tizen.Applications.Common/Interop/Interop.BaseUtilsi18n.cs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,45 +17,40 @@
1717
using System;
1818
using System.Collections.Generic;
1919
using System.Runtime.InteropServices;
20-
using System.Runtime.InteropServices.Marshalling;
2120
using System.Text;
2221

2322
using Tizen.Applications;
2423

2524
internal static partial class Interop
2625
{
27-
internal static class BaseUtilsi18n
26+
internal static partial class BaseUtilsi18n
2827
{
29-
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_canonicalize", CallingConvention = CallingConvention.Cdecl)]
28+
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_canonicalize")]
3029
internal static extern Int32 Canonicalize(string localeID, [Out] StringBuilder name, Int32 nameCapacity);
3130
// int32_t i18n_ulocale_canonicalize(const char *locale_id, char *name, int32_t name_capacity);c
3231

33-
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_language", CallingConvention = CallingConvention.Cdecl)]
32+
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_language")]
3433
internal static extern int GetLanguage(string localeID, [Out] StringBuilder language, Int32 languageCapacity, out int bufSizeLanguage);
3534
// int i18n_ulocale_get_language(const char *locale_id, char *language, int32_t language_capacity, int32_t *buf_size_language);
3635

37-
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_script", CallingConvention = CallingConvention.Cdecl)]
36+
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_script")]
3837
internal static extern Int32 GetScript(string localeID, [Out] StringBuilder script, Int32 scriptCapacity);
3938
// int32_t i18n_ulocale_get_script(const char *locale_id, char *script, int32_t script_capacity);
4039

41-
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_country", CallingConvention = CallingConvention.Cdecl)]
40+
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_country")]
4241
internal static extern Int32 GetCountry(string localeID, [Out] StringBuilder country, Int32 countryCapacity, out int err);
4342
// int32_t i18n_ulocale_get_country(const char *locale_id, char *country, int32_t country_capacity, int *error);
4443

45-
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_variant", CallingConvention = CallingConvention.Cdecl)]
44+
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_variant")]
4645
internal static extern Int32 GetVariant(string localeID, [Out] StringBuilder variant, Int32 variantCapacity);
4746
// int32_t i18n_ulocale_get_variant(const char *locale_id, char *variant, int32_t variant_capacity);
4847

49-
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_lcid", CallingConvention = CallingConvention.Cdecl)]
48+
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_lcid")]
5049
internal static extern UInt32 GetLCID(string localeID);
5150
// uint32_t i18n_ulocale_get_lcid(const char *locale_id);
5251

53-
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_default", CallingConvention = CallingConvention.Cdecl)]
52+
[DllImport(Libraries.BaseUtilsi18n, EntryPoint = "i18n_ulocale_get_default")]
5453
internal static extern int GetDefault(out IntPtr localeID);
5554
// int i18n_ulocale_get_default(const char **locale);
5655
}
5756
}
58-
59-
60-
61-

src/Tizen.Applications.DataControl/Interop/Interop.Libraries.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the License);
@@ -21,6 +21,3 @@ internal static partial class Libraries
2121
public const string DataControl = "libdata-control.so.0";
2222
}
2323
}
24-
25-
26-

src/Tizen.Applications.EventManager/Interop/Interop.Libraries.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the License);
@@ -21,6 +21,3 @@ internal static partial class Libraries
2121
public const string AppEvent = "libcapi-appfw-event.so.0";
2222
}
2323
}
24-
25-
26-

src/Tizen.Applications.MessagePort/Interop/Interop.Libraries.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the License);
@@ -21,6 +21,3 @@ internal static partial class Libraries
2121
public const string MessagePort = "libmessage-port.so.1";
2222
}
2323
}
24-
25-
26-

src/Tizen.Applications.Preference/Interop/Interop.Libraries.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the License);
@@ -21,6 +21,3 @@ internal static partial class Libraries
2121
public const string Preference = "libcapi-appfw-preference.so.0";
2222
}
2323
}
24-
25-
26-
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the License);
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an AS IS BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
using ElmSharp;
18+
using System;
19+
20+
namespace Tizen.Applications
21+
{
22+
internal sealed class RemoteWindow : Layout
23+
{
24+
private static IntPtr _handle;
25+
26+
private static EvasObject PrepareHandle(EvasObject parent, string widgetId, string content, double period)
27+
{
28+
_handle = Interop.WidgetViewerEvas.AddWidget(parent, widgetId, content, period);
29+
30+
int err = Internals.Errors.ErrorFacts.GetLastResult();
31+
RemoteView.CheckException((Interop.WidgetViewerEvas.ErrorCode)err);
32+
33+
if (_handle == IntPtr.Zero)
34+
throw new InvalidOperationException("Return null pointer");
35+
36+
return parent;
37+
}
38+
39+
internal RemoteWindow(EvasObject parent, string widgetId, string content, double period)
40+
: base(PrepareHandle(parent, widgetId, content, period))
41+
{
42+
}
43+
44+
protected override IntPtr CreateHandle(EvasObject parent)
45+
{
46+
IntPtr handle = _handle;
47+
48+
_handle = IntPtr.Zero;
49+
return handle;
50+
}
51+
}
52+
}
53+

src/Tizen.Applications.Service/Interop/Interop.Libraries.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the License);
@@ -21,6 +21,3 @@ internal static partial class Libraries
2121
public const string AppcoreAgent = "libappcore-agent.so.1";
2222
}
2323
}
24-
25-
26-

0 commit comments

Comments
 (0)