diff options
| author | Dario Freni <dariofreni@google.com> | 2018-07-16 11:08:03 +0100 |
|---|---|---|
| committer | Dario Freni <dariofreni@google.com> | 2018-07-19 16:12:13 +0100 |
| commit | e166facea335b9adcff7717d6d30150a41718668 (patch) | |
| tree | fee3bff71f8820141c6f58b9e733677c9c0e906e /dexdump | |
| parent | 6743f1ebd4a1a266896541acb5c4dde1f78e708f (diff) | |
| download | art-e166facea335b9adcff7717d6d30150a41718668.tar.gz art-e166facea335b9adcff7717d6d30150a41718668.tar.bz2 art-e166facea335b9adcff7717d6d30150a41718668.zip | |
Add a public error code to DexFileLoader::OpenAll.
Some of the APKs in the build system don't contain any dex file (e.g.
they are only there to test that PackageManager can install them).
Users of this library (e.g. veridex) can now verify the error condition
to determine whether they should just skip the file or propagate the
error.
Test: m test-art-host-gtest; ran veridex on an APK without classes.dex
Bug: 110073830
Bug: 78924201
Change-Id: I65b6a5aa8abb404a77b90352dd066fb0dff36955
Diffstat (limited to 'dexdump')
| -rw-r--r-- | dexdump/dexdump.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dexdump/dexdump.cc b/dexdump/dexdump.cc index 82610353b4..060d079270 100644 --- a/dexdump/dexdump.cc +++ b/dexdump/dexdump.cc @@ -1884,6 +1884,7 @@ int processFile(const char* fileName) { return -1; } const DexFileLoader dex_file_loader; + DexFileLoaderErrorCode error_code; std::string error_msg; std::vector<std::unique_ptr<const DexFile>> dex_files; if (!dex_file_loader.OpenAll(reinterpret_cast<const uint8_t*>(content.data()), @@ -1891,6 +1892,7 @@ int processFile(const char* fileName) { fileName, kVerify, kVerifyChecksum, + &error_code, &error_msg, &dex_files)) { // Display returned error message to user. Note that this error behavior |
