Treat "org.apache.http.legacy" as optional <uses-library> by default.

This doesn't affect the cases with explicitly set `uses_libs` or
`optional_uses_libs`, only the cases when the library implicitly added
to the manifest_fixer by Soong. "org.apache.http.legacy" should be
handled in the same way as "android.test.base", except that they have
been added in different SDK versions.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I4fa1f082bfdb67f227f432717731a7e3d790913c
This commit is contained in:
Ulya Trafimovich 2020-09-11 12:17:29 +01:00
parent 663dc53c94
commit e3bb01dfac
1 changed files with 5 additions and 6 deletions

View File

@ -100,18 +100,17 @@ type GlobalSoongConfig struct {
ConstructContext android.Path
}
// These two libs are added as optional dependencies (<uses-library> with
// android:required set to false). This is because they haven't existed in pre-P
// devices, but classes in them were in bootclasspath jars, etc. So making them
// hard dependencies (android:required=true) would prevent apps from being
// installed to such legacy devices.
// These libs are added as optional dependencies (<uses-library> with android:required set to false).
// This is because they haven't existed prior to certain SDK version, but classes in them were in
// bootclasspath jars, etc. So making them hard dependencies (android:required=true) would prevent
// apps from being installed to such legacy devices.
var OptionalCompatUsesLibs = []string{
"org.apache.http.legacy",
"android.test.base",
"android.test.mock",
}
var CompatUsesLibs = []string{
"org.apache.http.legacy",
"android.hidl.base-V1.0-java",
"android.hidl.manager-V1.0-java",
}