Pass the fd to OatFile::Setup to avoid selinux errors.
bug: 77853712
Test: test.py
Change-Id: I069cda5296b561284d71b067924e1bc4a8562710
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h
index 8d6ec00..a6d0961 100644
--- a/runtime/oat_file_assistant.h
+++ b/runtime/oat_file_assistant.h
@@ -378,7 +378,11 @@
// Clear any cached information and switch to getting info about the oat
// file with the given filename.
- void Reset(const std::string& filename, bool use_fd, int vdex_fd = -1, int oat_fd = -1);
+ void Reset(const std::string& filename,
+ bool use_fd,
+ int zip_fd = -1,
+ int vdex_fd = -1,
+ int oat_fd = -1);
// Release the loaded oat file for runtime use.
// Returns null if the oat file hasn't been loaded or is out of date.
@@ -415,6 +419,7 @@
bool filename_provided_ = false;
std::string filename_;
+ int zip_fd_ = -1;
int oat_fd_ = -1;
int vdex_fd_ = -1;
bool use_fd_ = false;