You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Java.Interop] JniType.RegisterNativeMethods() is public (#214)
Context: dotnet/android#1027
Context: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/2048/
Commit 7d51163 changed the visibility of
`JniType.RegisterNativeMethods()` from `public` to `internal`, in an
effort to reduce the likelihood of "user error" from calling
`JNIEnv::RegisterNatives()` multiple times, as
`JNIEnv::RegisterNatives()` invocations are *replacements*, not
"additive"; calling it more than once is *generally* Wrong™.
*Unfortunately*, `JniType.RegisterNativeMethods()` is part of the
public and shipping API, so we can't remove it, as seen in the
[xamarin-android PR build][pr2048] output:
[pr2048]: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/2048/consoleText
ABI BREAK IN: Java.Interop.dll
<!-- start namespace Java.Interop --> <div>
<h2>Namespace Java.Interop</h2>
<!-- start type JniType --> <div>
<h3>Type Changed: Java.Interop.JniType</h3>
<p>Removed method:</p>
<pre>
<span class='removed removed-method breaking' data-is-breaking>public void RegisterNativeMethods (JniNativeMethodRegistration[]);</span>
</pre>
Revert the visibility of `JniType.RegisterNativeMethods()` to
`public`, so that we don't break API compatibility.
0 commit comments