Revert "Load app images"
Fails when a method is duplicated (see test 097-duplicate-method)
Bug: 22858531
This reverts commit f7fd970244f143b1abb956e29794c446e4d57f46.
Change-Id: Ib30ae5be00cc568e799290be6b3c8f29cbbe4c20
diff --git a/runtime/gc/space/image_space.h b/runtime/gc/space/image_space.h
index f2f4163..9c8e8b2 100644
--- a/runtime/gc/space/image_space.h
+++ b/runtime/gc/space/image_space.h
@@ -35,7 +35,7 @@
return kSpaceTypeImageSpace;
}
- // Create a boot image space from an image file for a specified instruction
+ // Create a Space from an image file for a specified instruction
// set. Cannot be used for future allocation or collected.
//
// Create also opens the OatFile associated with the image file so
@@ -43,16 +43,10 @@
// creation of the alloc space. The ReleaseOatFile will later be
// used to transfer ownership of the OatFile to the ClassLinker when
// it is initialized.
- static ImageSpace* CreateBootImage(const char* image,
- InstructionSet image_isa,
- bool secondary_image,
- std::string* error_msg)
- SHARED_REQUIRES(Locks::mutator_lock_);
-
- // Try to open an existing app image space.
- static ImageSpace* CreateFromAppImage(const char* image,
- const OatFile* oat_file,
- std::string* error_msg)
+ static ImageSpace* Create(const char* image,
+ InstructionSet image_isa,
+ bool secondary_image,
+ std::string* error_msg)
SHARED_REQUIRES(Locks::mutator_lock_);
// Reads the image header from the specified image location for the
@@ -150,17 +144,15 @@
}
protected:
- // Tries to initialize an ImageSpace from the given image path, returning null on error.
+ // Tries to initialize an ImageSpace from the given image path,
+ // returning null on error.
//
- // If validate_oat_file is false (for /system), do not verify that image's OatFile is up-to-date
- // relative to its DexFile inputs. Otherwise (for /data), validate the inputs and generate the
- // OatFile in /data/dalvik-cache if necessary. If the oat_file is null, it uses the oat file from
- // the image.
- static ImageSpace* Init(const char* image_filename,
- const char* image_location,
- bool validate_oat_file,
- const OatFile* oat_file,
- std::string* error_msg)
+ // If validate_oat_file is false (for /system), do not verify that
+ // image's OatFile is up-to-date relative to its DexFile
+ // inputs. Otherwise (for /data), validate the inputs and generate
+ // the OatFile in /data/dalvik-cache if necessary.
+ static ImageSpace* Init(const char* image_filename, const char* image_location,
+ bool validate_oat_file, std::string* error_msg)
SHARED_REQUIRES(Locks::mutator_lock_);
OatFile* OpenOatFile(const char* image, std::string* error_msg) const