Skip to content

Commit

Permalink
Removed parsing and output for unused --target-api switch in dx.
Browse files Browse the repository at this point in the history
This is cherry-picked from dalvik-dev.

Change-Id: I74627e4c261e086e8c2c7cf38591cd3e9f5707e6
  • Loading branch information
jeffyhao committed Aug 23, 2011
1 parent 046b8cc commit 36db01e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion dx/src/com/android/dx/command/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class Main {
"[--dump-width=<n>]\n" +
" [--dump-method=<name>[*]] [--verbose-dump] [--no-files] " +
"[--core-library]\n" +
" [--num-threads=<n>] [--target-api=<n>]\n" +
" [--num-threads=<n>]\n" +
" [<file>.class | <file>.{zip,jar,apk} | <directory>] ...\n" +
" Convert a set of classfiles into a dex file, optionally " +
"embedded in a\n" +
Expand Down
16 changes: 0 additions & 16 deletions dx/src/com/android/dx/command/dexer/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -1117,22 +1117,6 @@ public void parse(String[] args) {
} else if (parser.isArg("--dump-method=")) {
methodToDump = parser.getLastValue();
jarOutput = false;
} else if (parser.isArg("--target-api=")) {
String arg = parser.getLastValue();
int value;
try {
value = Integer.parseInt(arg);
} catch (NumberFormatException ex) {
value = -1;
}
if (value < 1) {
System.err.println("improper target-api option: " + arg);
throw new UsageException();
}
// TODO: this currently causes confusion for unbundled apps.
// What we call 'target' is what developers call 'min', so
// they're accidentally turning on new opcodes.
// targetApiLevel = value;
} else if (parser.isArg("--positions=")) {
String pstr = parser.getLastValue().intern();
if (pstr == "none") {
Expand Down

0 comments on commit 36db01e

Please sign in to comment.