apex: dedup jni_libs when generating apex_manifest
When we package both 32/62, there could be two instances of the same
library. We need to dedup the list of jni_libs.
Bug: n/a
Test: m com.android.cronet (which uses jni_libs)
check apex_manifest.pb
Change-Id: I9a9f42f0f5219ab7bc50d945b54113b5d823b7f3
diff --git a/apex/builder.go b/apex/builder.go
index 0a1ec3e..160d3bb 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -193,7 +193,7 @@
// collect jniLibs. Notice that a.filesInfo is already sorted
var jniLibs []string
for _, fi := range a.filesInfo {
- if fi.isJniLib {
+ if fi.isJniLib && !android.InList(fi.Stem(), jniLibs) {
jniLibs = append(jniLibs, fi.Stem())
}
}