Clean up use of GetDalvikCache.

Switch the only caller of the non-void version of GetDalvikCache that set
create_if_absent true to use the void version of GetDalvikCache. Then no
callers of the non-void version of GetDalvikCache set create_if_absent to
true, so that argument is no longer needed. And without create_if_absent,
there is no case when the function will abort, so the 'OrDie" option is no
longer necessary.

Change-Id: I83f60dcc8a8f3b1f91fd2971e9028f6a7dd8384d
Test: m art-test-host
Test: m art-test-target
diff --git a/runtime/dex2oat_environment_test.h b/runtime/dex2oat_environment_test.h
index 743fbb9..d717ec0 100644
--- a/runtime/dex2oat_environment_test.h
+++ b/runtime/dex2oat_environment_test.h
@@ -137,7 +137,20 @@
   }
 
   bool GetCachedImageFile(/*out*/std::string* image, std::string* error_msg) const {
-    std::string cache = GetDalvikCache(GetInstructionSetString(kRuntimeISA), true);
+    std::string cache;
+    bool have_android_data;
+    bool dalvik_cache_exists;
+    bool is_global_cache;
+    GetDalvikCache(GetInstructionSetString(kRuntimeISA),
+                   true,
+                   &cache,
+                   &have_android_data,
+                   &dalvik_cache_exists,
+                   &is_global_cache);
+    if (!dalvik_cache_exists) {
+      *error_msg = "Failed to create dalvik cache";
+      return false;
+    }
     return GetDalvikCacheFilename(GetImageLocation().c_str(), cache.c_str(), image, error_msg);
   }