freezer: increase timeout to 5 mins

Some apps might still be performing leftover work after being
backgrounded. Considering possible latencies due to CPU preemption, and
in the effort to reduce the impact the app freezer has on legacy apps by
allowing them to a significant grace period, extend the freezer timeout to
5 mins.

Bug: 178023335
Test: manually verified that freeze time is increased to 5 minutes
Change-Id: I74c14288a66e9a54850c0ea2b70ef3b915c2ca82
This commit is contained in:
Marco Ballesio
2021-01-20 17:26:43 -08:00
parent 572c7f769c
commit 0eea704510

View File

@@ -133,7 +133,7 @@ public final class CachedAppOptimizer {
static final int REPORT_UNFREEZE_MSG = 4;
//TODO:change this static definition into a configurable flag.
static final int FREEZE_TIMEOUT_MS = 10000;
static final long FREEZE_TIMEOUT_MS = 600000;
static final int DO_FREEZE = 1;
static final int REPORT_UNFREEZE = 2;