3 ms·
Acording to https://android-developers.googleblog.com/2018/02/improving-stability-by-reducing-usage.html https://android-developers.googleblog.com/2018/02/impro
by Karliss 9y ago
Acording to https://android-developers.googleblog.com/2018/02/improving-stability-by-reducing-usage.html https://android-developers.googleblog.com/2018/02/improving-... it will simply not be possible to access API you are not supposed to touch. Trying it will result in NoSuchFieldException/NoSuchMethodException.
- saagarjha 9y ago> Starting in the next release of Android, some non-SDK methods and fields will be restricted so that you cannot access them -- either directly, via reflection, or JNI. If you try, you can see errors such as NoSuchFieldException or NoSuchMethodException. Yes, how is this done? Using SecurityManager or something similar?
- pjmlp 9y agoI guess so. For NDK they are using a similar process. Any attempt to use on-device libraries not part of the official NDK APIs will terminate the application.
- kllrnohj 9y agoIn the runtime itself: https://android-review.googlesource.com/c/platform/art/+/580003/10 https://android-review.googlesource.com/c/platform/art/+/580... CL is abandoned but it appears to have just be split up into smaller changes, so that should still give a good idea of the approach being used.