It may be needed in class loader context if the target API version
is less than 30.
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ifa5ab18d1dc322184100207ad6eee4bdcf74deb0
dexpreopt usually gets a dex jar instead of the final APK, which
means targetSdkVersion can't be parsed out of it. Move the
shared library verification to a tool that operates on the final
AndroidManifest.xml instead. verify_uses_libraries.sh is still
used to verify prebuilts where we don't have an AndroidManifest.xml
and must parse it out of the APK.
Test: m Gallery2
Bug: 132357300
Change-Id: I6ade74b6144c73aee094f5d5ff343067ca0a0e5a
Required libraries are specified with LOCAL_USES_LIBRARIES
Optional libraries are specified with LOCAL_OPTIONAL_USES_LIBRARIES
The make rule cross references the libraries against what's stored
in the manifest.
Verification is enabled if LOCAL_ENFORCE_USES_LIBRARIES is true. This
defaults to true if either of LOCAL_USES_LIBRARIES or
LOCAL_OPTIONAL_USES_LIBRARIES are specified.
Bug: 70934104
Bug: 67345922
Test: manual
(cherry picked from commit 09f3b97f4b)
Merged-In: Ifca7d1a993620e9d0e42dc497a4a5d7a6c3f4172
Change-Id: I670431f938c31115a7812c1857c31b9f71675632