diff options
author | Brett Chabot <brettchabot@android.com> | 2012-02-27 18:37:55 -0800 |
---|---|---|
committer | Brett Chabot <brettchabot@android.com> | 2012-02-27 18:37:55 -0800 |
commit | 23cbd25a9129083834c30ce683d2aad3a2fca8c1 (patch) | |
tree | 9bc358a5428aa64e6b148b612d9892914bfeb59c /ddms/libs | |
parent | f2b5037221d45de68aa50e47a9b2c6de37fddaaa (diff) | |
download | sdk-23cbd25a9129083834c30ce683d2aad3a2fca8c1.zip sdk-23cbd25a9129083834c30ce683d2aad3a2fca8c1.tar.gz sdk-23cbd25a9129083834c30ce683d2aad3a2fca8c1.tar.bz2 |
Usec a shorter timeout for Device#getPropertySync.
Change-Id: Ica768daddb71664edc32e65cca6a42beff19ff1d
Diffstat (limited to 'ddms/libs')
-rw-r--r-- | ddms/libs/ddmlib/src/com/android/ddmlib/Device.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java b/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java index 45b6533..a60742d 100644 --- a/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java +++ b/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java @@ -37,6 +37,7 @@ final class Device implements IDevice { private final static int INSTALL_TIMEOUT = 2*60*1000; //2min private static final int BATTERY_TIMEOUT = 2*1000; //2 seconds + private static final int GETPROP_TIMEOUT = 2*1000; //2 seconds /** Emulator Serial Number regexp. */ final static String RE_EMULATOR_SN = "emulator-(\\d+)"; //$NON-NLS-1$ @@ -258,7 +259,7 @@ final class Device implements IDevice { public String getPropertySync(String name) throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException, IOException { CollectingOutputReceiver receiver = new CollectingOutputReceiver(); - executeShellCommand(String.format("getprop '%s'", name), receiver); + executeShellCommand(String.format("getprop '%s'", name), receiver, GETPROP_TIMEOUT); String value = receiver.getOutput().trim(); if (value.isEmpty()) { return null; |