/** * Terminates a child process. This may be called from any thread. * * @param pid The pid (process handle) of the service connection obtained from {@link #start}. */ @CalledByNative static void stop(int pid) { Log.d(TAG, "stopping child connection: pid=" + pid); ChildProcessConnection connection = sServiceMap.remove(pid); if (connection == null) { logPidWarning(pid, "Tried to stop non-existent connection"); return; } sBindingManager.clearConnection(pid); connection.stop(); freeConnection(connection); }