Merge "Allow smaller watchdog timeouts for user debug builds to detect more regressions." into main

This commit is contained in:
Olivier Gaillard
2023-07-11 16:53:56 +00:00
committed by Android (Google) Code Review

View File

@@ -453,7 +453,7 @@ public class Watchdog implements Dumpable {
mInterestingJavaPids.add(Process.myPid());
// See the notes on DEFAULT_TIMEOUT.
assert DB ||
assert DB || Build.IS_USERDEBUG ||
DEFAULT_TIMEOUT > ZygoteConnectionConstants.WRAPPED_PID_TIMEOUT_MILLIS;
mTraceErrorLogger = new TraceErrorLogger();
@@ -527,7 +527,8 @@ public class Watchdog implements Dumpable {
*/
void updateWatchdogTimeout(long timeoutMillis) {
// See the notes on DEFAULT_TIMEOUT.
if (!DB && timeoutMillis <= ZygoteConnectionConstants.WRAPPED_PID_TIMEOUT_MILLIS) {
if (!DB && !Build.IS_USERDEBUG
&& timeoutMillis <= ZygoteConnectionConstants.WRAPPED_PID_TIMEOUT_MILLIS) {
timeoutMillis = ZygoteConnectionConstants.WRAPPED_PID_TIMEOUT_MILLIS + 1;
}
mWatchdogTimeoutMillis = timeoutMillis;