Android StrictMode 在哪里实现?
我希望扩展 StrictMode API,类似于建议在此 StackOverflow 问题中。我看到 Honeycomb 中的 API 进行了扩展,包含了 detectorCustomSlowMethod() API,这听起来好像它可以处理一些扩展情况(尽管我不确定它的作用,因为文档是从磁盘方法复制粘贴的)。
但是,我想扩展 API 以包含额外的硬件访问检测,这是 API 无法实现的。因此,我的问题是在哪里可以找到实现 StrictMode API 的代码?
I'm looking to extend the StrictMode API, similar to what is suggested in this StackOverflow question. I saw that the API was extended in Honeycomb to include a detectCustomSlowMethod() API, which sounds like it could handle some extension cases (although I'm not sure what it does because the documentation is copy-pasted from the disk methods).
However, I want to extend the API to include additional hardware access detection, which isn't possible with the API. Therefore, my question is where can I find the code that implements the StrictMode API?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Android 源代码< /a>.
In the Android source code.
这是主要的 Java 接口:
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/StrictMode.java
不过,这些实现都在 Android 内部。
Here's the main Java interface:
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/StrictMode.java
The implementations is all over the Android guts, though.