ART: Postpone interface-related dex failure to version 37
For app compat, at least for now make the check for public-final-static
of interface members not fail on dex file versions less than 37. This
may be changed in future releases.
Bug: 27831184
Change-Id: If8ee50321298b951d4a78062c8eb583fec27394f
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 6849984..1456636 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -107,6 +107,9 @@
uint32_t data_size_; // unused
uint32_t data_off_; // unused
+ // Decode the dex magic version
+ uint32_t GetVersion() const;
+
private:
DISALLOW_COPY_AND_ASSIGN(Header);
};
@@ -479,7 +482,9 @@
}
// Decode the dex magic version
- uint32_t GetVersion() const;
+ uint32_t GetVersion() const {
+ return GetHeader().GetVersion();
+ }
// Returns true if the byte string points to the magic value.
static bool IsMagicValid(const uint8_t* magic);