Skip to content

Commit a2771cd

Browse files
committed
[marshal methods] Make AndroidEnvironmentInternal.UnhandledException public
Fixes: #10602 Context: 8bc7a3e This is in the category of "how the hell has it worked before?", as every time the `AndroidEnvironmentInternal.UnhandledException` method living in `Mono.Android.Runtime.dll` would be called, the runtime would respond with a method not accessible exception, rightly so as both the type and the method were internal and visible only to `Mono.Android.dll`. I guess we haven't had many unhandled exceptions in marshal method wrappers over the years? This PR fixes the problem by making both the type and the method public. This is the simplest way to fix the issue.
1 parent e397464 commit a2771cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Mono.Android.Runtime/Android.Runtime/AndroidEnvironmentInternal.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace Android.Runtime
44
{
5-
internal static class AndroidEnvironmentInternal
5+
public static class AndroidEnvironmentInternal
66
{
77
internal static Action<Exception>? UnhandledExceptionHandler;
88

9-
internal static void UnhandledException (Exception e)
9+
public static void UnhandledException (Exception e)
1010
{
1111
if (UnhandledExceptionHandler == null) {
1212
return;

0 commit comments

Comments
 (0)