Remove the ability to load the boot image from dalvik cache

Generation of boot image in dalvik cache is not supported since
6732b8057061ee753a9ff7cc6d79c2edd0a33168 (https://r.android.com/1454861).

Bug: 160683548
Bug: 177313562
Test: atest ArtGtestsTargetInstallApex
Test: m test-art-host-gtest
Change-Id: I5034b873535767d8694bc6c4fe05d90cf8b51588
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 496ca15..4cd1f1d 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -545,8 +545,17 @@
     return false;
   }
 
-  std::string cache_dir = GetDalvikCache(GetInstructionSetString(isa));
-  if (cache_dir.empty()) {
+  std::string dalvik_cache;
+  bool have_android_data = false;
+  bool dalvik_cache_exists = false;
+  bool is_global_cache = false;
+  GetDalvikCache(GetInstructionSetString(isa),
+                  /*create_if_absent=*/ true,
+                  &dalvik_cache,
+                  &have_android_data,
+                  &dalvik_cache_exists,
+                  &is_global_cache);
+  if (!dalvik_cache_exists) {
     *error_msg = "Dalvik cache directory does not exist";
     return false;
   }
@@ -554,7 +563,7 @@
   // TODO: The oat file assistant should be the definitive place for
   // determining the oat file name from the dex location, not
   // GetDalvikCacheFilename.
-  return GetDalvikCacheFilename(location.c_str(), cache_dir.c_str(), oat_filename, error_msg);
+  return GetDalvikCacheFilename(location.c_str(), dalvik_cache.c_str(), oat_filename, error_msg);
 }
 
 const std::vector<uint32_t>* OatFileAssistant::GetRequiredDexChecksums() {