Skip to content

Commit

Permalink
[One .NET] Don't preserve all of Android.Runtime.JNIEnv (#5362)
Browse files Browse the repository at this point in the history
Context: #5167

Some members of `Android.Runtime.JNIEnv` are accessed via Reflection,
and need to be preserved, but that doesn't mean the *entire type*
needs to be preserved.

Update the `<type/>` preservation XML so that only the required
methods are always preserved, allowing the linker to remove other
unused members.
  • Loading branch information
radekdoulik authored Dec 10, 2020
1 parent f18b836 commit d435a97
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
<type fullname="Android.Runtime.IJavaObject" />
<type fullname="Android.Runtime.InputStreamAdapter" />
<type fullname="Android.Runtime.InputStreamInvoker" />
<type fullname="Android.Runtime.JNIEnv" />
<type fullname="Android.Runtime.JNIEnv">
<method name="Exit" />
<method name="Initialize" />
<method name="PropagateUncaughtException" />
<method name="RegisterJniNatives" />
</type>
<type fullname="Android.Runtime.JniNativeInterfaceStruct" />
<type fullname="Android.Runtime.JniNativeInterfaceInvoker" />
<type fullname="Android.Runtime.JNINativeWrapper" />
Expand Down

0 comments on commit d435a97

Please sign in to comment.