Loading services/core/java/com/android/server/Watchdog.java +12 −4 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ import java.util.HashSet; import java.util.List; /** This class calls its monitor every minute. Killing this process if they don't return **/ public class Watchdog extends Thread { public class Watchdog { static final String TAG = "Watchdog"; /** Debug flag. */ Loading Loading @@ -132,6 +132,8 @@ public class Watchdog extends Thread { private static Watchdog sWatchdog; private final Thread mThread; /* This handler will be used to post message back onto the main thread */ private final ArrayList<HandlerChecker> mHandlerCheckers = new ArrayList<>(); private final HandlerChecker mMonitorChecker; Loading Loading @@ -311,7 +313,7 @@ public class Watchdog extends Thread { } private Watchdog() { super("watchdog"); mThread = new Thread(this::run, "watchdog"); // Initialize handler checkers for each common thread we want to check. Note // that we are not currently checking the background thread, since it can // potentially hold longer running operations with no guarantees about the timeliness Loading Loading @@ -354,6 +356,13 @@ public class Watchdog extends Thread { DEFAULT_TIMEOUT > ZygoteConnectionConstants.WRAPPED_PID_TIMEOUT_MILLIS; } /** * Called by SystemServer to cause the internal thread to begin execution. */ public void start() { mThread.start(); } /** * Registers a {@link BroadcastReceiver} to listen to reboot broadcasts and trigger reboot. * Should be called during boot after the ActivityManagerService is up and registered Loading Loading @@ -550,8 +559,7 @@ public class Watchdog extends Thread { return pids; } @Override public void run() { private void run() { boolean waitedHalf = false; while (true) { final List<HandlerChecker> blockedCheckers; Loading Loading
services/core/java/com/android/server/Watchdog.java +12 −4 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ import java.util.HashSet; import java.util.List; /** This class calls its monitor every minute. Killing this process if they don't return **/ public class Watchdog extends Thread { public class Watchdog { static final String TAG = "Watchdog"; /** Debug flag. */ Loading Loading @@ -132,6 +132,8 @@ public class Watchdog extends Thread { private static Watchdog sWatchdog; private final Thread mThread; /* This handler will be used to post message back onto the main thread */ private final ArrayList<HandlerChecker> mHandlerCheckers = new ArrayList<>(); private final HandlerChecker mMonitorChecker; Loading Loading @@ -311,7 +313,7 @@ public class Watchdog extends Thread { } private Watchdog() { super("watchdog"); mThread = new Thread(this::run, "watchdog"); // Initialize handler checkers for each common thread we want to check. Note // that we are not currently checking the background thread, since it can // potentially hold longer running operations with no guarantees about the timeliness Loading Loading @@ -354,6 +356,13 @@ public class Watchdog extends Thread { DEFAULT_TIMEOUT > ZygoteConnectionConstants.WRAPPED_PID_TIMEOUT_MILLIS; } /** * Called by SystemServer to cause the internal thread to begin execution. */ public void start() { mThread.start(); } /** * Registers a {@link BroadcastReceiver} to listen to reboot broadcasts and trigger reboot. * Should be called during boot after the ActivityManagerService is up and registered Loading Loading @@ -550,8 +559,7 @@ public class Watchdog extends Thread { return pids; } @Override public void run() { private void run() { boolean waitedHalf = false; while (true) { final List<HandlerChecker> blockedCheckers; Loading