Add dexlayout option for updating checksum

-u causes dexlayout to update the Dex checksum.

Test: manual
Bug: 113059564
Change-Id: I915f1fa50b56255a972407ddb4e03492cc65e26c
diff --git a/dexlayout/dexlayout_main.cc b/dexlayout/dexlayout_main.cc
index 71e56d19..9f73347 100644
--- a/dexlayout/dexlayout_main.cc
+++ b/dexlayout/dexlayout_main.cc
@@ -60,6 +60,7 @@
   LOG(ERROR) << " -p : profile file name (defaults to no profile)";
   LOG(ERROR) << " -s : visualize reference pattern";
   LOG(ERROR) << " -t : display file section sizes";
+  LOG(ERROR) << " -u : update dex checksums";
   LOG(ERROR) << " -v : verify output file is canonical to input (IR level comparison)";
   LOG(ERROR) << " -w : output dex directory";
   LOG(ERROR) << " -x : compact dex generation level, either 'none' or 'fast'";
@@ -85,7 +86,7 @@
 
   // Parse all arguments.
   while (1) {
-    const int ic = getopt(argc, argv, "abcdefghil:o:p:stvw:x:");
+    const int ic = getopt(argc, argv, "abcdefghil:o:p:stuvw:x:");
     if (ic < 0) {
       break;  // done
     }
@@ -138,6 +139,9 @@
         options.show_section_statistics_ = true;
         options.verbose_ = false;
         break;
+      case 'u':  // update checksum
+        options.update_checksum_ = true;
+        break;
       case 'v':  // verify output
         options.verify_output_ = true;
         break;