diff options
-rw-r--r-- | ddms/libs/ddmlib/src/com/android/ddmlib/AdbHelper.java | 5 | ||||
-rwxr-xr-x | ddms/libs/ddmlib/src/com/android/ddmlib/IDevice.java | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/AdbHelper.java b/ddms/libs/ddmlib/src/com/android/ddmlib/AdbHelper.java index 0f5a532..f31e27f 100644 --- a/ddms/libs/ddmlib/src/com/android/ddmlib/AdbHelper.java +++ b/ddms/libs/ddmlib/src/com/android/ddmlib/AdbHelper.java @@ -338,9 +338,12 @@ final class AdbHelper { * @param device the {@link IDevice} on which to execute the command. * @param rcvr the {@link IShellOutputReceiver} that will receives the output of the shell * command - * @param timeout timeout value in ms for the connection. 0 means no timeout. + * @param timeout timeout value in ms for the connection. 0 means no timeout. This only affects + * the timeout for reading the command output. Execution setup uses the normal timeout. * @throws TimeoutException in case of timeout on the connection. * @throws IOException in case of I/O error on the connection. + * + * @see DdmPreferences#getTimeOut() */ static void executeRemoteCommand(InetSocketAddress adbSockAddr, String command, IDevice device, IShellOutputReceiver rcvr, int timeout) diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/IDevice.java b/ddms/libs/ddmlib/src/com/android/ddmlib/IDevice.java index d75c9c3..59ae910 100755 --- a/ddms/libs/ddmlib/src/com/android/ddmlib/IDevice.java +++ b/ddms/libs/ddmlib/src/com/android/ddmlib/IDevice.java @@ -203,15 +203,16 @@ public interface IDevice { /** * Executes a shell command on the device, and sends the result to a <var>receiver</var>. - * <p/>The timeout value is used as a maximum waiting time when expecting data from the device. + * <p/>The timeout value is used as a maximum waiting time when expecting the command + * output from the device.<br> * If the shell command takes a long time to run before outputting anything, this may be * impacted by the timeout. For instance, if the command outputs one line every 10sec but the * timeout is set to 5sec (default value) then the method will timeout. * <p/>For commands like log output, a timeout value of 0 (no timeout, always blocking till the * receiver's {@link IShellOutputReceiver#isCancelled()} return <code>true</code> should be * used. - * <p/>Finally note that the timeout value is used both when interacting with the device - * to setup the command to run and when receiving the output of the command. + * <p/>When setting up the shell command to run, the normal timeout value is used while + * communicating with adb. * * @param command the shell command to execute * @param receiver the {@link IShellOutputReceiver} that will receives the output of the shell @@ -223,6 +224,8 @@ public interface IDevice { * no timeout will occur as it's not possible to detect a difference between no output and * no timeout. * @throws IOException in case of I/O error on the connection. + * + * @see DdmPreferences#getTimeOut() */ public void executeShellCommand(String command, IShellOutputReceiver receiver, int timeout) throws TimeoutException, IOException; |