OSDN Git Service

Minor fix for Adb.waitForNonEmptyDirectory so that waiting for /sdcard after reboot...
authorBrian Carlstrom <bdc@google.com>
Wed, 24 Feb 2010 00:39:09 +0000 (16:39 -0800)
committerBrian Carlstrom <bdc@google.com>
Wed, 24 Feb 2010 00:39:09 +0000 (16:39 -0800)
libcore/tools/runner/java/dalvik/runner/Adb.java

index 0ab14ec..c982058 100644 (file)
@@ -81,7 +81,11 @@ final class Adb {
         while (true) {
             final long remainingSeconds = ((deadline - System.currentTimeMillis())
                                            / millisPerSecond);
-            Command command = new Command("adb", "shell", "ls", path.getPath());
+            String pathArgument = path.getPath();
+            if (!file) {
+                pathArgument += "/";
+            }
+            Command command = new Command("adb", "shell", "ls", pathArgument);
             List<String> output;
             try {
                 output = command.executeWithTimeout(remainingSeconds);