diff options
author | Jing Ji <jji@google.com> | 2023-10-18 10:20:07 -0700 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-19 00:08:30 +0000 |
commit | 022c18e4041bb8587bba469bae40cc8b8acf4e16 (patch) | |
tree | 11f2f02f38212f300f895979a8cba5aa27b1676d | |
parent | 35a86388147937889e55fb847f7b0f27ef1e051c (diff) | |
download | base-022c18e4041bb8587bba469bae40cc8b8acf4e16.tar.gz |
Extend the BIND_APPLICATION_TIMEOUT
We're reporting an ANR if the app process doesn't finish
the handling of bindApplication within the BIND_APPLICATION_TIMEOUT.
But very often, due to the contended system resources, the app
process just doesn't get enough CPU time to run.
Also given the bindApplication includes the time the app spends
on Application#onCreate(), now relax the timeout to 20s by default.
Bug: 304484667
Test: Manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9e814a91321f3ecd32521f83ac5fed20388b7d07)
Merged-In: If8a3db7511ef0b348e9f343fd91de9063f8826f2
Change-Id: If8a3db7511ef0b348e9f343fd91de9063f8826f2
-rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index e00884fb59f5..be96af3e8035 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -561,7 +561,7 @@ public class ActivityManagerService extends IActivityManager.Stub static final int PROC_START_TIMEOUT = 10 * 1000 * Build.HW_TIMEOUT_MULTIPLIER; // How long we wait for a launched process to complete its app startup before we ANR. - static final int BIND_APPLICATION_TIMEOUT = 10 * 1000 * Build.HW_TIMEOUT_MULTIPLIER; + static final int BIND_APPLICATION_TIMEOUT = 20 * 1000 * Build.HW_TIMEOUT_MULTIPLIER; // How long we wait to kill an application zygote, after the last process using // it has gone away. |