Loading services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java +10 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,8 @@ public class CompanionDeviceManagerService extends SystemService implements Bind private static final long DEVICE_DISAPPEARED_TIMEOUT_MS = 10 * 1000; private static final long DEVICE_DISAPPEARED_UNBIND_TIMEOUT_MS = 10 * 60 * 1000; private static final long DEVICE_LISTENER_DIED_REBIND_TIMEOUT_MS = 10 * 1000; private static final boolean DEBUG = false; private static final String LOG_TAG = "CompanionDeviceManagerService"; Loading Loading @@ -1131,6 +1133,14 @@ public class CompanionDeviceManagerService extends SystemService implements Bind // Service binding is managed manually based on corresponding device being nearby return Long.MAX_VALUE; } @Override public void binderDied() { super.binderDied(); // Re-connect to the service if process gets killed mMainHandler.postDelayed(this::connect, DEVICE_LISTENER_DIED_REBIND_TIMEOUT_MS); } }; } Loading Loading
services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java +10 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,8 @@ public class CompanionDeviceManagerService extends SystemService implements Bind private static final long DEVICE_DISAPPEARED_TIMEOUT_MS = 10 * 1000; private static final long DEVICE_DISAPPEARED_UNBIND_TIMEOUT_MS = 10 * 60 * 1000; private static final long DEVICE_LISTENER_DIED_REBIND_TIMEOUT_MS = 10 * 1000; private static final boolean DEBUG = false; private static final String LOG_TAG = "CompanionDeviceManagerService"; Loading Loading @@ -1131,6 +1133,14 @@ public class CompanionDeviceManagerService extends SystemService implements Bind // Service binding is managed manually based on corresponding device being nearby return Long.MAX_VALUE; } @Override public void binderDied() { super.binderDied(); // Re-connect to the service if process gets killed mMainHandler.postDelayed(this::connect, DEVICE_LISTENER_DIED_REBIND_TIMEOUT_MS); } }; } Loading