From dec12c69b4e09679f691050d8fdcab0a5e474258 Mon Sep 17 00:00:00 2001 From: Guang Zhu Date: Fri, 14 Jun 2013 19:32:23 -0700 Subject: 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 --- .../src/com/android/commands/uiautomator/DumpCommand.java | 10 +++++----- 1 file 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); } -- cgit v1.2.3