Fix use_embedded_native_libs handling for android_test
`use_embedded_native_libs: true` should cause
`--extract-native-libs=false` be added to the manifest_fixer invocation,
and it was not happening.
There are also minor naming improvements.
Bug: 117618214
Test: treehugger and 'atest CtsDynamicLinkerTestCases' after
cts/tests/tests/dynamic_linker has been converted to Android.bp.
Change-Id: I93ec2aed3f3b185d320e56b1b4eebb71339b81ee
diff --git a/java/android_manifest.go b/java/android_manifest.go
index ea7c2dd..7b378cd 100644
--- a/java/android_manifest.go
+++ b/java/android_manifest.go
@@ -43,7 +43,7 @@
// Uses manifest_fixer.py to inject minSdkVersion, etc. into an AndroidManifest.xml
func manifestFixer(ctx android.ModuleContext, manifest android.Path, sdkContext sdkContext,
- isLibrary, uncompressedJNI, usesNonSdkApis, useEmbeddedDex bool) android.Path {
+ isLibrary, useEmbeddedNativeLibs, usesNonSdkApis, useEmbeddedDex bool) android.Path {
var args []string
if isLibrary {
@@ -54,8 +54,8 @@
ctx.ModuleErrorf("invalid minSdkVersion: %s", err)
}
if minSdkVersion >= 23 {
- args = append(args, fmt.Sprintf("--extract-native-libs=%v", !uncompressedJNI))
- } else if uncompressedJNI {
+ args = append(args, fmt.Sprintf("--extract-native-libs=%v", !useEmbeddedNativeLibs))
+ } else if useEmbeddedNativeLibs {
ctx.ModuleErrorf("module attempted to store uncompressed native libraries, but minSdkVersion=%d doesn't support it",
minSdkVersion)
}