summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2013-06-14 19:32:23 -0700
committerGuang Zhu <guangzhu@google.com>2013-06-14 19:38:24 -0700
commitdec12c69b4e09679f691050d8fdcab0a5e474258 (patch)
treea57d815b17e28444f6bd1f100154cb7e91ff2a48
parent17fac436d78f6ac642386a245fb4fdb7243a91a4 (diff)
downloaduiautomator-dec12c69b4e09679f691050d8fdcab0a5e474258.tar.gz
change verbose mode default to true and change param accordingly
vebose mode maps to uncompressed hierarchy on device. since we are using uncompressed hierarchy by default for device test, we should use verbose mode by default here. otherwise when user uses viewer tool, it will show compressed hierarchy by default, which causes test cases to be written against wrong assumptions since we are changing the heuristics here, we are also changing '--verbose' to '--compressed' accordingly Change-Id: I6fd55fd57a65d6eb0755ee34cbc1c34731788afb
-rw-r--r--cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java b/cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java
index 3a4e783..c35f7fc 100644
--- a/cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java
+++ b/cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java
@@ -52,7 +52,7 @@ public class DumpCommand extends Command {
@Override
public String detailedOptions() {
return " dump [--verbose][file]\n"
- + " [--verbose]: dumps all layout information.\n"
+ + " [--compressed]: dumps compressed layout information.\n"
+ " [file]: the location where the dumped XML should be stored, default is\n "
+ DEFAULT_DUMP_FILE.getAbsolutePath() + "\n";
}
@@ -60,11 +60,11 @@ public class DumpCommand extends Command {
@Override
public void run(String[] args) {
File dumpFile = DEFAULT_DUMP_FILE;
- boolean verboseMode = false;
+ boolean verboseMode = true;
for (String arg : args) {
- if (arg.equals("--verbose"))
- verboseMode = true;
+ if (arg.equals("--compressed"))
+ verboseMode = false;
else if (!arg.startsWith("-")) {
dumpFile = new File(arg);
}
@@ -73,9 +73,9 @@ public class DumpCommand extends Command {
UiAutomationShellWrapper automationWrapper = new UiAutomationShellWrapper();
automationWrapper.connect();
if (verboseMode) {
+ // default
automationWrapper.setCompressedLayoutHierarchy(false);
} else {
- // default
automationWrapper.setCompressedLayoutHierarchy(true);
}