Do not add dependencies of shared SDK libraries to manifest_fixer.
Test: lunch aosp_cf_x86_phone-userdebug && m Bug: 132357300 Bug: 168686456 Change-Id: Ibd9742684fa6a8f1353ca0e513f7fa814a6ec9fc
This commit is contained in:
@@ -1981,7 +1981,7 @@ func (u *usesLibrary) classLoaderContextForUsesLibDeps(ctx android.ModuleContext
|
||||
if tag, ok := ctx.OtherModuleDependencyTag(m).(usesLibraryDependencyTag); ok {
|
||||
dep := ctx.OtherModuleName(m)
|
||||
if lib, ok := m.(Dependency); ok {
|
||||
clcMap.AddContextForSdk(ctx, tag.sdkVersion, dep,
|
||||
clcMap.AddContextForSdk(ctx, tag.sdkVersion, dep, isSharedSdkLibrary(m),
|
||||
lib.DexJarBuildPath(), lib.DexJarInstallPath(), lib.ExportedSdkLibs())
|
||||
} else if ctx.Config().AllowMissingDependencies() {
|
||||
ctx.AddMissingDependencies([]string{dep})
|
||||
@@ -1995,6 +1995,11 @@ func (u *usesLibrary) classLoaderContextForUsesLibDeps(ctx android.ModuleContext
|
||||
return clcMap
|
||||
}
|
||||
|
||||
func isSharedSdkLibrary(m android.Module) bool {
|
||||
lib, ok := m.(SdkLibraryDependency)
|
||||
return ok && lib.IsSharedLibrary()
|
||||
}
|
||||
|
||||
// enforceUsesLibraries returns true of <uses-library> tags should be checked against uses_libs and optional_uses_libs
|
||||
// properties. Defaults to true if either of uses_libs or optional_uses_libs is specified. Will default to true
|
||||
// unconditionally in the future.
|
||||
|
Reference in New Issue
Block a user