ART: Store classpath information into oat file

Store a "dependency list" of class-path dex-files into the key-value
store of an oat file. The list is made up of dex locations and
corresponding checksums.

Add tests for encoding, decoding and checking the list.

Bug: 19781184
Change-Id: Ie700dd37e6e086db599c95d329ac1f1d2ff0b758
diff --git a/runtime/oat_file.h b/runtime/oat_file.h
index 73a8c8e..a5d5ae8 100644
--- a/runtime/oat_file.h
+++ b/runtime/oat_file.h
@@ -248,6 +248,18 @@
   static std::string ResolveRelativeEncodedDexLocation(
       const char* abs_dex_location, const std::string& rel_dex_location);
 
+  // Create a dependency list (dex locations and checksums) for the given dex files.
+  static std::string EncodeDexFileDependencies(const std::vector<const DexFile*>& dex_files);
+
+  // Check the given dependency list against their dex files - thus the name "Static," this does
+  // not check the class-loader environment, only whether there have been file updates.
+  static bool CheckStaticDexFileDependencies(const char* dex_dependencies, std::string* msg);
+
+  // Get the dex locations of a dependency list. Note: this is *not* cleaned for synthetic
+  // locations of multidex files.
+  static bool GetDexLocationsFromDependencies(const char* dex_dependencies,
+                                              std::vector<std::string>* locations);
+
  private:
   static void CheckLocation(const std::string& location);