diff options
author | 2021-08-20 15:39:12 +0100 | |
---|---|---|
committer | 2021-08-20 15:54:42 +0100 | |
commit | 0b1c70efbcbb0c8408f44964923f5b156d025936 (patch) | |
tree | 572e3e7218e154ca5a0cde5f25598541f171d59c /java/base.go | |
parent | 99d5a0f5c9f2ba5386134b44d44be03ccaf94b35 (diff) |
Don't add `uses_libs`/`optional_uses_libs` to the manifest_fixer.
These properties specify libraries that cannot be implicitly inferred by
Soong. If these properties are added to Android.bp, this can only be for
the reason that there is a <uses-library> tag in the manifest which is
unknown to the build system. Adding them to the manifest_fixer doesn't
make sense: if they are not in the manifest, they should be removed from
Android.bp as well.
Bug: 132357300
Test: $ lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd
$ adb wait-for-device && adb root && adb logcat \
| grep -E 'ClassLoaderContext [a-z ]+ mismatch'
# empty grep output, no errors
Change-Id: Ic6eb5268a954ef3be7f06a181ec72af99000c547
Diffstat (limited to 'java/base.go')
-rw-r--r-- | java/base.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/java/base.go b/java/base.go index ea5b13721..8e6d1cd50 100644 --- a/java/base.go +++ b/java/base.go @@ -606,10 +606,8 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { if component, ok := dep.(SdkLibraryComponentDependency); ok { if lib := component.OptionalSdkLibraryImplementation(); lib != nil { // Add library as optional if it's one of the optional compatibility libs. - tag := usesLibReqTag - if android.InList(*lib, dexpreopt.OptionalCompatUsesLibs) { - tag = usesLibOptTag - } + optional := android.InList(*lib, dexpreopt.OptionalCompatUsesLibs) + tag := makeUsesLibraryDependencyTag(dexpreopt.AnySdkVersion, optional, true) ctx.AddVariationDependencies(nil, tag, *lib) } } |