Commit 1ecab11
Refactor Libraryimport/phase 2 (#7560)
* Migrate DllImport to LibraryImport in medium-risk modules (Phase 2)
Convert DllImport declarations to LibraryImport (source-generated P/Invoke)
for the following modules:
- Tizen.Applications: Common, DataControl, PackageManager, Notification, NotificationEventListener, Shortcut, Cion, ComponentBased, WatchfaceComplication, WidgetControl, UIGadget, UnitedService
- Tizen.Content: Download, MediaContent
- Tizen.Security
Changes:
- Apply [LibraryImport] and StringMarshalling.Utf8
- Add [MarshalAs(UnmanagedType.U1)] for bool parameters
- Safely cherry-picked keeping new additions in main (e.g. Discovery)
- Filter.cs excluded due to SafeHandle out parameter generation limits
* [Fix] Phase 2: Fix build errors in Tizen.Applications.Common
- Fix double [MarshalAs] on 'out bool' params in RPCPort.cs (3 instances)
- Add StringMarshalling.Utf8 to string-returning methods in AppCommon.cs (SYSLIB1051)
- Fix 'partial unsafe' → 'unsafe partial' keyword order in Bundle.cs (CS0267)
* [Fix] Phase 2: Deep clean - remove 26 unnecessary StringMarshalling, convert residual DllImport
- Remove 26 redundant StringMarshalling.Utf8 from methods without string params
- Convert DevicePolicyManager.PasswordGetExpires from DllImport to LibraryImport
* [Fix] Phase 2: Revert 16 files that overlap with Phase 1 to main
Reverted to avoid merge conflicts when both PRs land.
* [Fix] Phase 2: Revert 68 files belonging to Phase 3/4 to main
Account.* (41 files → Phase 3), Network.* (27 files → Phase 4) modules
were inadvertently included from the source commit. Reverted to main
to ensure zero overlap between all Phase branches.
* [Fix] Phase 2: Revert incorrect MarshalAs(U1) on DllImport bool params
DllImport uses 4-byte BOOL by default (matching C's int/bool).
Adding [MarshalAs(UnmanagedType.U1)] changes it to 1-byte, causing
ABI mismatch with native Tizen C APIs. MarshalAs(U1) is only needed
for LibraryImport which has no default bool marshalling.
* [Fix] Phase 2: Revert delegate bool MarshalAs changes (separate PR scope)
Reverted [return: MarshalAs(UnmanagedType.U1)] on delegate bool returns
and [MarshalAs(UnmanagedType.U1)] on delegate bool params across 14 files.
These changes require separate ABI analysis and should be in their own PR.
* [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.
* [Fix] Phase 2: Exclude TCT-failing modules from PR
Reverted: Tizen.Content.Download, Tizen.Security.WebAuthn,
Tizen.Security.SecureRepository, Tizen.Applications.Shortcut
---------
Co-authored-by: Jay Cho <chojoog@gmail.com>1 parent 52de757 commit 1ecab11
File tree
72 files changed
+2089
-1893
lines changed- src
- Tizen.Applications.Alarm/Interop
- Tizen.Applications.AttachPanel/Interop
- Tizen.Applications.Badge/Interop
- Tizen.Applications.Cion/Interop
- Tizen.Applications.Common/Interop
- Tizen.Applications.ComponentBased.ComponentManager/Interop
- Tizen.Applications.ComponentBased.Port/Interop
- Tizen.Applications.ComponentBased/Interop
- Tizen.Applications.EventManager/Interop
- Tizen.Applications.MessagePort/Interop
- Tizen.Applications.NotificationEventListener/Interop
- Tizen.Applications.Notification/Interop
- Tizen.Applications.PackageManager/Interop
- Tizen.Applications.Preference/Interop
- Tizen.Applications.ThemeManager/Interop
- Tizen.Applications.ToastMessage/Interop
- Tizen.Applications.UIGadget/Interop
- Tizen.Applications.UI/Interop
- Tizen.Applications.UnitedService/Interop
- Tizen.Applications.WatchfaceComplication/Tizen.Applications/Interop
- Tizen.Applications.WidgetControl/Interop
- Tizen.Content.MimeType/Interop
- Tizen.Multimedia/Interop
- Tizen.Security.DevicePolicyManager/Interop
- Tizen.Security.PrivacyPrivilegeManager/Interop
- Tizen.Security/Interop
- Tizen.System.Information/Interop
- Tizen/Interop
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
72 files changed
+2089
-1893
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
48 | 47 | | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
51 | 50 | | |
52 | | - | |
53 | | - | |
| 51 | + | |
| 52 | + | |
54 | 53 | | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
60 | 59 | | |
61 | | - | |
62 | | - | |
| 60 | + | |
| 61 | + | |
63 | 62 | | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
66 | 65 | | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
69 | 68 | | |
70 | | - | |
71 | | - | |
| 69 | + | |
| 70 | + | |
72 | 71 | | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
75 | 74 | | |
76 | | - | |
77 | | - | |
| 75 | + | |
| 76 | + | |
78 | 77 | | |
79 | | - | |
80 | | - | |
| 78 | + | |
| 79 | + | |
81 | 80 | | |
82 | | - | |
83 | | - | |
| 81 | + | |
| 82 | + | |
84 | 83 | | |
85 | | - | |
86 | | - | |
| 84 | + | |
| 85 | + | |
87 | 86 | | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
90 | 89 | | |
91 | | - | |
92 | | - | |
| 90 | + | |
| 91 | + | |
93 | 92 | | |
94 | | - | |
95 | | - | |
| 93 | + | |
| 94 | + | |
96 | 95 | | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
99 | 98 | | |
100 | | - | |
101 | | - | |
| 99 | + | |
| 100 | + | |
102 | 101 | | |
103 | | - | |
104 | | - | |
| 102 | + | |
| 103 | + | |
105 | 104 | | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
108 | 107 | | |
109 | | - | |
110 | | - | |
| 108 | + | |
| 109 | + | |
111 | 110 | | |
112 | | - | |
113 | | - | |
| 111 | + | |
| 112 | + | |
114 | 113 | | |
115 | | - | |
116 | | - | |
| 114 | + | |
| 115 | + | |
117 | 116 | | |
118 | | - | |
119 | | - | |
| 117 | + | |
| 118 | + | |
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
| |||
Lines changed: 31 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
36 | 35 | | |
37 | | - | |
38 | | - | |
| 36 | + | |
| 37 | + | |
39 | 38 | | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
42 | 41 | | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
45 | 44 | | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
48 | 47 | | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
51 | 50 | | |
52 | | - | |
53 | | - | |
| 51 | + | |
| 52 | + | |
54 | 53 | | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
60 | 59 | | |
61 | | - | |
62 | | - | |
| 60 | + | |
| 61 | + | |
63 | 62 | | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
66 | 65 | | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
69 | 68 | | |
70 | | - | |
71 | | - | |
| 69 | + | |
| 70 | + | |
72 | 71 | | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
75 | 74 | | |
76 | | - | |
77 | | - | |
| 75 | + | |
| 76 | + | |
78 | 77 | | |
79 | | - | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
40 | | - | |
| 38 | + | |
| 39 | + | |
41 | 40 | | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
44 | 43 | | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
47 | 46 | | |
48 | | - | |
49 | | - | |
| 47 | + | |
| 48 | + | |
50 | 49 | | |
51 | | - | |
52 | | - | |
| 50 | + | |
| 51 | + | |
53 | 52 | | |
54 | | - | |
55 | | - | |
| 53 | + | |
| 54 | + | |
56 | 55 | | |
57 | | - | |
58 | | - | |
| 56 | + | |
| 57 | + | |
59 | 58 | | |
60 | | - | |
61 | | - | |
| 59 | + | |
| 60 | + | |
62 | 61 | | |
63 | | - | |
64 | | - | |
| 62 | + | |
| 63 | + | |
65 | 64 | | |
66 | 65 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments