AI 147180: am: CL 147176 am: CL 147174 ADT #1801919: Make default options output a bit more friendly.
  Original author: raphael
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 147180
diff --git a/tools/sdkmanager/app/src/com/android/sdkmanager/CommandLineProcessor.java b/tools/sdkmanager/app/src/com/android/sdkmanager/CommandLineProcessor.java
index 9f3fb99..c20bfa4 100644
--- a/tools/sdkmanager/app/src/com/android/sdkmanager/CommandLineProcessor.java
+++ b/tools/sdkmanager/app/src/com/android/sdkmanager/CommandLineProcessor.java
@@ -482,22 +482,29 @@
             if (arg.getVerb().equals(verb) && arg.getDirectObject().equals(directObject)) {
                 
                 String value = "";
-                if (arg.getDefaultValue() instanceof String[]) {
-                    for (String v : (String[]) arg.getDefaultValue()) {
-                        if (value.length() > 0) {
-                            value += ", ";
+                String required = "";
+                if (arg.isMandatory()) {
+                    required = " [required]";
+                    
+                } else {
+                    if (arg.getDefaultValue() instanceof String[]) {
+                        for (String v : (String[]) arg.getDefaultValue()) {
+                            if (value.length() > 0) {
+                                value += ", ";
+                            }
+                            value += v;
                         }
-                        value += v;
+                    } else if (arg.getDefaultValue() != null) {
+                        Object v = arg.getDefaultValue();
+                        if (arg.getMode() != MODE.BOOLEAN || v.equals(Boolean.TRUE)) {
+                            value = v.toString();
+                        }
                     }
-                } else if (arg.getDefaultValue() != null) {
-                    value = arg.getDefaultValue().toString();
-                }
-                if (value.length() > 0) {
-                    value = " (" + value + ")";
+                    if (value.length() > 0) {
+                        value = " [Default: " + value + "]";
+                    }
                 }
                 
-                String required = arg.isMandatory() ? " [required]" : "";
-
                 stdout("  -%1$s %2$-10s %3$s%4$s%5$s",
                         arg.getShortArg(),
                         "--" + arg.getLongArg(),