summaryrefslogtreecommitdiff
path: root/runtime/vdex_file.h
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2022-01-16 14:01:36 -0800
committerLinux Build Service Account <lnxbuild@localhost>2022-01-16 14:01:36 -0800
commit5806f26e603150889d7b7e044cd8fb685c832f4e (patch)
treee60b0a64a2b342e96f6b886ec3e2e453e494e567 /runtime/vdex_file.h
parentaa20688e701376b1a4cfffc6284721819806cb90 (diff)
parentf9da627a42193f596d33d799bf323fced18214c5 (diff)
Merge f9da627a42193f596d33d799bf323fced18214c5 on remote branch
Change-Id: Iaf48868208da271af8b4536f089c44bf4412cc9e
Diffstat (limited to 'runtime/vdex_file.h')
-rw-r--r--runtime/vdex_file.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/vdex_file.h b/runtime/vdex_file.h
index eb8b81742b..a66ff88fb2 100644
--- a/runtime/vdex_file.h
+++ b/runtime/vdex_file.h
@@ -157,8 +157,6 @@ class VdexFile {
return size;
}
- bool IsDexSectionValid() const;
-
bool HasDexSection() const {
return GetSectionHeader(VdexSection::kDexFileSection).section_size != 0u;
}
@@ -251,6 +249,9 @@ class VdexFile {
const uint8_t* Begin() const { return mmap_.Begin(); }
const uint8_t* End() const { return mmap_.End(); }
size_t Size() const { return mmap_.Size(); }
+ bool Contains(const uint8_t* pointer) const {
+ return pointer >= Begin() && pointer < End();
+ }
const VdexFileHeader& GetVdexFileHeader() const {
return *reinterpret_cast<const VdexFileHeader*>(Begin());