diff options
| author | 2020-05-29 17:14:46 +0000 | |
|---|---|---|
| committer | 2020-05-29 17:14:46 +0000 | |
| commit | 7c9db5d13f3165f44ebc36d2b8d21bb436d314ec (patch) | |
| tree | 5fd0c573dec36df45408dd21629d7d96ffcb1a8f | |
| parent | ae9170cdd000e283328748237fb6d7fca931a77e (diff) | |
| parent | df00ddecb6288f6d4bff4e6dbc260e3b837137a5 (diff) | |
Merge "Don't use obsolete "org.apache.http.legacy.impl" in class loader context."
| -rw-r--r-- | dexpreopt/dexpreopt.go | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go index fc0356301..15d2ed22c 100644 --- a/dexpreopt/dexpreopt.go +++ b/dexpreopt/dexpreopt.go @@ -256,28 +256,22 @@ func dexpreoptCommand(ctx android.PathContext, globalSoong *GlobalSoongConfig, g filepath.Join("/system/framework", l+".jar")) } + // org.apache.http.legacy contains classes that were in the default classpath until API 28. + // If the targetSdkVersion in the manifest or APK is < 28, and the module does not explicitly + // depend on org.apache.http.legacy, then implicitly add it to the classpath for dexpreopt. const httpLegacy = "org.apache.http.legacy" - const httpLegacyImpl = "org.apache.http.legacy.impl" - - // org.apache.http.legacy contains classes that were in the default classpath until API 28. If the - // targetSdkVersion in the manifest or APK is < 28, and the module does not explicitly depend on - // org.apache.http.legacy, then implicitly add the classes to the classpath for dexpreopt. One the - // device the classes will be in a file called org.apache.http.legacy.impl.jar. - module.LibraryPaths[httpLegacyImpl] = module.LibraryPaths[httpLegacy] - - if !contains(module.UsesLibraries, httpLegacy) && !contains(module.PresentOptionalUsesLibraries, httpLegacy) { + if !contains(usesLibs, httpLegacy) { conditionalClassLoaderContextHost28 = append(conditionalClassLoaderContextHost28, - pathForLibrary(module, httpLegacyImpl)) + pathForLibrary(module, httpLegacy)) conditionalClassLoaderContextTarget28 = append(conditionalClassLoaderContextTarget28, - filepath.Join("/system/framework", httpLegacyImpl+".jar")) + filepath.Join("/system/framework", httpLegacy+".jar")) } - const hidlBase = "android.hidl.base-V1.0-java" - const hidlManager = "android.hidl.manager-V1.0-java" - // android.hidl.base-V1.0-java and android.hidl.manager-V1.0 contain classes that were in the default // classpath until API 29. If the targetSdkVersion in the manifest or APK is < 29 then implicitly add // the classes to the classpath for dexpreopt. + const hidlBase = "android.hidl.base-V1.0-java" + const hidlManager = "android.hidl.manager-V1.0-java" conditionalClassLoaderContextHost29 = append(conditionalClassLoaderContextHost29, pathForLibrary(module, hidlManager)) conditionalClassLoaderContextTarget29 = append(conditionalClassLoaderContextTarget29, |