dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.93k stars 529 forks source link

[illink] Review and remove API in Android.Runtime.AndroidEnvironment #5361

Open radekdoulik opened 3 years ago

radekdoulik commented 3 years ago

Some of the API which is consumed from mono BCL, is not used anymore on .NET5/6. Like https://github.com/mono/mono/blob/4c8d3505ed5bad8ef1c8b7e355a8cc257b3e2f1b/mcs/class/System/System/AndroidPlatform.cs#L59 for example.

We can stop building parts of Android.Runtime.AndroidEnvironment on .NET5/6.

marek-safar commented 3 years ago

I suspect all methods can be removed. We don't have AndroidPlatform in netcore at all and don't have plans to add it

akoeplinger commented 2 years ago

In addition to the managed code, a lot of the related native code e.g. https://github.com/xamarin/xamarin-android/blob/65afc11e5fa1805902cd3431a0548bc59a2247cd/src/monodroid/jni/xamarin_getifaddrs.cc can be removed as well.

We do need GetHttpMessageHandler however since it is called by System.Net.Http.HttpClientHandler.