ANR超时
Activity 超时 5秒
ActivityManagerService.java1
2// How long we wait until we timeout on key dispatching.
static final int KEY_DISPATCHING_TIMEOUT = 5*1000;
前台service 超时默认20秒 后台service 超时200秒
android framework 源码中 ActiveServices.java
1 | // How long we wait for a service to finish executing. |
1 | void serviceTimeout(ProcessRecord proc) { |
广播,前台 10秒 后台60秒
ActivityManagerService.java1
2
3// How long we allow a receiver to run before giving up on it.
static final int BROADCAST_FG_TIMEOUT = 10*1000;
static final int BROADCAST_BG_TIMEOUT = 60*1000;