Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e814a91 authored by Jing Ji's avatar Jing Ji
Browse files

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
Merged-In: I442e997fa6f30445ddeb2922146e837cc24d4174
Change-Id: If8a3db7511ef0b348e9f343fd91de9063f8826f2
parent 29c1f42f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.