Add <uses-library> information.
The required <uses-library> "org.apache.http.legacy" is in the manifest
for StatementService. It must be explicitly added to `uses_libs` because
since https://r.android.com/1424793 Soong considers it optional (so it
would add it to `optional_uses_libs` instead of `uses_libs`). Ideally,
"org.apache.http.legacy" should be automatically treated as required if
it is an explicit dependency and the targetSdkVersion >= 28 and
minSdkVersion >= 28 (28 is the version in which "org.apache.http.legacy"
was added to platform), but Soong does not have the information
available to make that decision, so it defers to optional in order to be
safe, and so `uses_libs` is needed to override that.
"android.test.runner" is added to CtsShim because it's in the manifest,
but not one of the dependencies, so Soong cannot add it auptmatically.
Bug: 132357300
Test: lunch cf_x86_phone-userdebug && m
Test: m out/soong/.intermediates/frameworks/base/packages/CtsShim/build/CtsShimPrivUpgrade/android_common/manifest_check/AndroidManifest.xml
Test: m out/soong/.intermediates/frameworks/base/packages/CtsShim/build/CtsShimPrivUpgradeWrongSHA/android_common/manifest_check/AndroidManifest.xml
Test: m out/soong/.intermediates/frameworks/base/packages/StatementService/StatementService/android_common/manifest_check/AndroidManifest.xml
Change-Id: Id12741c9b3cd6dd7676bc4c6b9db08b815361e4e
2 files changed