summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2013-06-14 19:32:23 -0700
committerThe Android Automerger <android-build@android.com>2013-06-15 12:21:23 -0700
commit13d258c956acb528575e48cf07faae6371ba0914 (patch)
tree2737121f584277d470cadd685a82509d636f3640
parent469b553d832943a7f65f4159c9cd9bb9c3c0dcb8 (diff)
downloadtesting-jb-mr2-release.tar.gz
change verbose mode default to true and change param accordinglyandroid-4.3_r1.1android-4.3_r1android-4.3_r0.9.1jb-mr2-release
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--uiautomator/cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/uiautomator/cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java b/uiautomator/cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java
index 3a4e783..c35f7fc 100644
--- a/uiautomator/cmds/uiautomator/src/com/android/commands/uiautomator/DumpCommand.java
+++ b/uiautomator/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);
}