"Application Not Responding" (ANR)
谷歌 android官网上说的ANR 是由谁来监测的,2种情况会导致ANR
In Android, application responsiveness is monitored by the Activity Manager and Window Manager system services. Android will display the ANR dialog for a particular application when it detects one of the following conditions:
- No response to an input event (such as key press or screen touch events) within 5 seconds.
- A
BroadcastReceiver
hasn't finished executing within 10 seconds.
http://developer.android.com/training/articles/perf-anr.html 官网介绍
后面准备 研究一下
ActivityManagerService.java
WindowManagerService.java
查看android 如何监测 用户输入5秒不响应,广播10秒未处理完。
http://blog.csdn.net/hudashi/article/details/7879229 一个讲如何避免ANR的很不错的文章