Make DexFiles opened from files readonly by default, but writable during dex2oat
Bug: 9618388
Change-Id: I83f2e16ee8446a79a94a84971146d807bb0c9ee0
diff --git a/runtime/dex_file_test.cc b/runtime/dex_file_test.cc
index 6449493..32a8354 100644
--- a/runtime/dex_file_test.cc
+++ b/runtime/dex_file_test.cc
@@ -75,6 +75,8 @@
ScopedObjectAccess soa(Thread::Current());
const DexFile* dex_file = DexFile::Open(location, location);
CHECK(dex_file != NULL);
+ EXPECT_EQ(PROT_READ, dex_file->GetPermissions());
+ EXPECT_TRUE(dex_file->IsReadOnly());
return dex_file;
}