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

Commit 40273bc4 authored by Olivier Gaillard's avatar Olivier Gaillard Committed by Android (Google) Code Review
Browse files

Merge "Add a new method to the Watchdog to extend the timeout of Monitors...

Merge "Add a new method to the Watchdog to extend the timeout of Monitors added through #addMonitor." into main
parents 8608ee91 d705c016
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -643,6 +643,16 @@ public class Watchdog implements Dumpable {
        }
    }

    /**
     * Sets a one-off timeout for the next run of the watchdog for the monitor thread.
     *
     * <p>Simiar to {@link setOneOffTimeoutForCurrentThread} but used for monitors added through
     * {@link #addMonitor}
     */
    public void setOneOffTimeoutForMonitors(int oneOffTimeoutMillis, String reason) {
        mMonitorChecker.setOneOffTimeoutLocked(oneOffTimeoutMillis, reason);
    }

    /**
     * Pauses Watchdog action for the currently running thread. Useful before executing long running
     * operations that could falsely trigger the watchdog. Each call to this will require a matching