diff options
Diffstat (limited to 'dx/src/com/android/dx/command/dexer/Main.java')
-rw-r--r-- | dx/src/com/android/dx/command/dexer/Main.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dx/src/com/android/dx/command/dexer/Main.java b/dx/src/com/android/dx/command/dexer/Main.java index 84baa935b..06ffcedef 100644 --- a/dx/src/com/android/dx/command/dexer/Main.java +++ b/dx/src/com/android/dx/command/dexer/Main.java @@ -1204,6 +1204,9 @@ public class Main { /** whether to run in debug mode */ public boolean debug = false; + /** whether to emit warning messages */ + public boolean warnings = true; + /** whether to emit high-level verbose human-oriented output */ public boolean verbose = false; @@ -1414,6 +1417,8 @@ public class Main { while(parser.getNext()) { if (parser.isArg("--debug")) { debug = true; + } else if (parser.isArg("--no-warning")) { + warnings = false; } else if (parser.isArg("--verbose")) { verbose = true; } else if (parser.isArg("--verbose-dump")) { @@ -1585,7 +1590,12 @@ public class Main { cfOptions.optimizeListFile = optimizeListFile; cfOptions.dontOptimizeListFile = dontOptimizeListFile; cfOptions.statistics = statistics; - cfOptions.warn = DxConsole.err; + + if (warnings) { + cfOptions.warn = DxConsole.err; + } else { + cfOptions.warn = DxConsole.noop; + } dexOptions = new DexOptions(); dexOptions.forceJumbo = forceJumbo; |