OSDN Git Service

Fix some javadocs regarding the timeout API change.
authorXavier Ducrohet <xav@android.com>
Wed, 14 Jul 2010 02:42:26 +0000 (19:42 -0700)
committerXavier Ducrohet <xav@android.com>
Wed, 14 Jul 2010 02:43:53 +0000 (19:43 -0700)
Change-Id: I7e96c253aa07b124bceab99b6f5ce11e17f7b950

ddms/libs/ddmlib/src/com/android/ddmlib/AdbHelper.java
ddms/libs/ddmlib/src/com/android/ddmlib/IDevice.java

index 0f5a532..f31e27f 100644 (file)
@@ -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)
index d75c9c3..59ae910 100755 (executable)
@@ -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;