APK-in-APEX should set use_embedded_native_libs: true

So far, we automatically have embedded JNI libs for APKs in APEX, even
if use_embedded_native_libs was not set or set to false.

With this change, such APKs should explicitly set the property.

This is in preparation for an upcoming change for using different
dependency tags to JNI deps depending on whether they are embedded (thus
no install is needed), or not (thus installation to the partition is
needed).

shouldEmbedJni function now doesn't make use of the ApexInfoProvider
which is not available during deps mutator.

Bug: N/A
Test: m
Change-Id: I836171aacba19dbfa0e09f16a773ae498c56d60b
This commit is contained in:
Jiyong Park
2024-05-15 20:33:06 +09:00
parent 4f487c5b56
commit 5f0943f33f
2 changed files with 15 additions and 2 deletions

View File

@@ -5908,6 +5908,7 @@ func TestApexWithApps(t *testing.T) {
srcs: ["foo/bar/MyClass.java"],
sdk_version: "current",
system_modules: "none",
use_embedded_native_libs: true,
jni_libs: ["libjni"],
stl: "none",
apex_available: [ "myapex" ],