summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-01-05 18:57:35 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-01-05 18:57:35 +0000
commit7f13ce4d95e2f8e38a82021058025509b7e994df (patch)
tree352445566227357219fd53aa45b11ed0c5af82c1
parent6f1f3c05a2c625b274abe56f34501c4fb81bee69 (diff)
parent53fcdf163a31e1af3a32af503afcd78d99f0c0ce (diff)
downloadart-oreo-m6-s4-release.tar.gz
Change-Id: I11eee977bf620bfae5825b3d7335c803f921913d
-rw-r--r--runtime/gc/space/image_space.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index fe0d35f455..3aab4c6bba 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -1574,7 +1574,9 @@ std::unique_ptr<ImageSpace> ImageSpace::CreateBootImage(const char* image_locati
if (!Runtime::Current()->IsImageDex2OatEnabled()) {
local_error_msg = "Patching disabled.";
} else if (secondary_image) {
- local_error_msg = "Cannot patch a secondary image.";
+ // We really want a working image. Prune and restart.
+ PruneDalvikCache(image_isa);
+ _exit(1);
} else if (ImageCreationAllowed(is_global_cache, image_isa, &local_error_msg)) {
bool patch_success =
RelocateImage(image_location, cache_filename.c_str(), image_isa, &local_error_msg);