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
diff --git a/dexpreopt/config.go b/dexpreopt/config.go
index 6e4bfee..21f7bb3 100644
--- a/dexpreopt/config.go
+++ b/dexpreopt/config.go
@@ -100,18 +100,17 @@
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",
}