Loading services/core/java/com/android/server/Watchdog.java +14 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,17 @@ public class Watchdog extends Thread { } } /** Monitor for checking the availability of binder threads. The monitor will block until * there is a binder thread available to process in coming IPCs to make sure other processes * can still communicate with the service. */ private static final class BinderThreadMonitor implements Watchdog.Monitor { @Override public void monitor() { Binder.blockUntilThreadAvailable(); } } public interface Monitor { void monitor(); } Loading Loading @@ -227,6 +238,9 @@ public class Watchdog extends Thread { // And the display thread. mHandlerCheckers.add(new HandlerChecker(DisplayThread.getHandler(), "display thread", DEFAULT_TIMEOUT)); // Initialize monitor for Binder threads. addMonitor(new BinderThreadMonitor()); } public void init(Context context, ActivityManagerService activity) { Loading services/core/java/com/android/server/am/ActivityManagerService.java +0 −10 Original line number Diff line number Diff line Loading @@ -2179,15 +2179,6 @@ public final class ActivityManagerService extends ActivityManagerNative } } public static final class BinderThreadMonitor implements Watchdog.Monitor { /** This method will block until there is a binder thread available to process * in coming IPCs to make sure other processes can still communicate with the service. */ @Override public void monitor() { Binder.blockUntilThreadAvailable(); } } // Note: This method is invoked on the main thread but may need to attach various // handlers to other threads. So take care to be explicit about the looper. public ActivityManagerService(Context systemContext) { Loading Loading @@ -2282,7 +2273,6 @@ public final class ActivityManagerService extends ActivityManagerNative }; Watchdog.getInstance().addMonitor(this); Watchdog.getInstance().addMonitor(new BinderThreadMonitor()); Watchdog.getInstance().addThread(mHandler); } Loading Loading
services/core/java/com/android/server/Watchdog.java +14 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,17 @@ public class Watchdog extends Thread { } } /** Monitor for checking the availability of binder threads. The monitor will block until * there is a binder thread available to process in coming IPCs to make sure other processes * can still communicate with the service. */ private static final class BinderThreadMonitor implements Watchdog.Monitor { @Override public void monitor() { Binder.blockUntilThreadAvailable(); } } public interface Monitor { void monitor(); } Loading Loading @@ -227,6 +238,9 @@ public class Watchdog extends Thread { // And the display thread. mHandlerCheckers.add(new HandlerChecker(DisplayThread.getHandler(), "display thread", DEFAULT_TIMEOUT)); // Initialize monitor for Binder threads. addMonitor(new BinderThreadMonitor()); } public void init(Context context, ActivityManagerService activity) { Loading
services/core/java/com/android/server/am/ActivityManagerService.java +0 −10 Original line number Diff line number Diff line Loading @@ -2179,15 +2179,6 @@ public final class ActivityManagerService extends ActivityManagerNative } } public static final class BinderThreadMonitor implements Watchdog.Monitor { /** This method will block until there is a binder thread available to process * in coming IPCs to make sure other processes can still communicate with the service. */ @Override public void monitor() { Binder.blockUntilThreadAvailable(); } } // Note: This method is invoked on the main thread but may need to attach various // handlers to other threads. So take care to be explicit about the looper. public ActivityManagerService(Context systemContext) { Loading Loading @@ -2282,7 +2273,6 @@ public final class ActivityManagerService extends ActivityManagerNative }; Watchdog.getInstance().addMonitor(this); Watchdog.getInstance().addMonitor(new BinderThreadMonitor()); Watchdog.getInstance().addThread(mHandler); } Loading