Do not fail when loading an APK without dex files.
There are some packages that claims to have dex code but actually
doesn't. There isn't a way to filter them out using Package Manager
APIs. Before this change, when ART Service tries to dexopt them,
profman prints annoying errors like "OpenZip failed for ... Entry not
found". See details in b/263245950.
This CL updates ArtDexFileLoader to just return an empty vector of dex
files if the APK doesn't have any dex file.
Bug: 263245950
Test: atest art_standalone_libdexfile_tests
Test: -
1. adb shell pm art dexopt-package -m speed-profile com.google.android.storagemanager.auto_generated_rro_product__
2. See no error in the logs.
Ignore-AOSP-First: Will cherry-pick as soon as the CL is merged.
Change-Id: If2c4c923f254fb4c2ae7a579543cc1c429b98ce1
5 files changed