Merge "Fix panic when a module has an invalid output path"
This commit is contained in:
22
java/app.go
22
java/app.go
@@ -760,18 +760,18 @@ func collectAppDeps(ctx android.ModuleContext, app appDepsInterface,
|
|||||||
}
|
}
|
||||||
|
|
||||||
lib := dep.OutputFile()
|
lib := dep.OutputFile()
|
||||||
path := lib.Path()
|
|
||||||
if seenModulePaths[path.String()] {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
seenModulePaths[path.String()] = true
|
|
||||||
|
|
||||||
if checkNativeSdkVersion && dep.SdkVersion() == "" {
|
|
||||||
ctx.PropertyErrorf("jni_libs", "JNI dependency %q uses platform APIs, but this module does not",
|
|
||||||
otherName)
|
|
||||||
}
|
|
||||||
|
|
||||||
if lib.Valid() {
|
if lib.Valid() {
|
||||||
|
path := lib.Path()
|
||||||
|
if seenModulePaths[path.String()] {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
seenModulePaths[path.String()] = true
|
||||||
|
|
||||||
|
if checkNativeSdkVersion && dep.SdkVersion() == "" {
|
||||||
|
ctx.PropertyErrorf("jni_libs", "JNI dependency %q uses platform APIs, but this module does not",
|
||||||
|
otherName)
|
||||||
|
}
|
||||||
|
|
||||||
jniLibs = append(jniLibs, jniLib{
|
jniLibs = append(jniLibs, jniLib{
|
||||||
name: ctx.OtherModuleName(module),
|
name: ctx.OtherModuleName(module),
|
||||||
path: path,
|
path: path,
|
||||||
|
Reference in New Issue
Block a user