Check for metadata hash if specified

When calling applyPayload(), gmscore passes content of
payload_properties.txt and a payload_metadata.bin . If hash of
payload_metadata.bin is specified, we should make sure it matches
content of payload_metadata.bin . b/279455981 looks like a different
payload_metadata.bin is passed than that GMSCore advertises, causing OTA
failures later on.

Test: th
Bug: 279455981
Change-Id: I12448c152e967a4a45ee75164bbe33d4f502a60c
diff --git a/aosp/update_attempter_android.h b/aosp/update_attempter_android.h
index c2226b2..bbffbe9 100644
--- a/aosp/update_attempter_android.h
+++ b/aosp/update_attempter_android.h
@@ -221,8 +221,14 @@
   // Helper of public VerifyPayloadApplicable. Return the parsed manifest in
   // |manifest|.
   static bool VerifyPayloadParseManifest(const std::string& metadata_filename,
+                                         std::string_view metadata_hash,
                                          DeltaArchiveManifest* manifest,
                                          brillo::ErrorPtr* error);
+  static bool VerifyPayloadParseManifest(const std::string& metadata_filename,
+                                         DeltaArchiveManifest* manifest,
+                                         brillo::ErrorPtr* error) {
+    return VerifyPayloadParseManifest(metadata_filename, "", manifest, error);
+  }
 
   // Enqueue and run a CleanupPreviousUpdateAction.
   void ScheduleCleanupPreviousUpdate();