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
{{ message }}
Repository navigation
System.Net.NetworkInformation needs Android PAL #51303
Currently, System.Net.NetworkInformation implementation on Android falls back to Linux PAL. This needs to change because starting from API 24 Android restricts access to many files in the /sys filesystem which makes the API unsupported.
Right now the APIs fail with System.UnauthorizedAccessException. We need to write an Android-specific PAL layer that uses Java APIs via JNI to access the information to not break developers migrating from existing Mono based BCL.
It would be good to get list of failing methods & properties @marek-safar. I made changes in the past to linked GetAllNetworkInterfaces() do depend less on /proc & /sys. It certainly feels better to throw PNSP or have alternative implementation than getting access violation. I would be curious to see how big that difference is.
That is ok. I was primarily wondering how much code we will need to replace. Number of test is somewhat approximation. If there are only few functions we may simply add alternatives instead of doing whole new pal. there is already some precedent for that.
Activity
filipnavara commentedon Apr 15, 2021
For reference, the Xamarin.Android implementation of the code resides here. Mono used to call it through several indirections.
wfurt commentedon Apr 20, 2021
It would be good to get list of failing methods & properties @marek-safar. I made changes in the past to linked GetAllNetworkInterfaces() do depend less on /proc & /sys. It certainly feels better to throw PNSP or have alternative implementation than getting access violation. I would be curious to see how big that difference is.
marek-safar commentedon Apr 21, 2021
@wfurt see #50567
wfurt commentedon Apr 21, 2021
That list does not give the list of files @marek-safar. But it seems to be mostly stats.
marek-safar commentedon Apr 22, 2021
@wfurt perhaps I misunderstood the ask, what are you looking for exactly?
wfurt commentedon Apr 22, 2021
That is ok. I was primarily wondering how much code we will need to replace. Number of test is somewhat approximation. If there are only few functions we may simply add alternatives instead of doing whole new pal. there is already some precedent for that.