Command-line flag to disable signing with APK Signature Scheme v2.

This change makes signapk not reject the --disable-v2 command-line
flag which may be used by build scripts in some branches. The flag
is currently ignored.

This change is landed separately from the actual support for APK
Signature Scheme v2 because of unbundled branches which use prebuilt
versions of signapk.

Bug: 25794543
Change-Id: I900966244b8b6296b1f443bf98830cc7f7cc81a8
diff --git a/tools/signapk/src/com/android/signapk/SignApk.java b/tools/signapk/src/com/android/signapk/SignApk.java
index 06a8d7f..1aeff4f 100644
--- a/tools/signapk/src/com/android/signapk/SignApk.java
+++ b/tools/signapk/src/com/android/signapk/SignApk.java
@@ -899,6 +899,8 @@
         System.err.println("Usage: signapk [-w] " +
                            "[-a <alignment>] " +
                            "[-providerClass <className>] " +
+                           "[--min-sdk-version <n>] " +
+                           "[--disable-v2] " +
                            "publickey.x509[.pem] privatekey.pk8 " +
                            "[publickey2.x509[.pem] privatekey2.pk8 ...] " +
                            "input.jar output.jar");
@@ -941,9 +943,11 @@
                     minSdkVersion = Integer.parseInt(minSdkVersionString);
                 } catch (NumberFormatException e) {
                     throw new IllegalArgumentException(
-                            "min-sdk-version must be a decimal number: " + minSdkVersionString);
+                            "--min-sdk-version must be a decimal number: " + minSdkVersionString);
                 }
                 ++argstart;
+            } else if ("--disable-v2".equals(args[argstart])) {
+                ++argstart;
             } else {
                 usage();
             }