Fix panic when missing hiddenapi jar

Fix a panic after reporting an error when a module is listed
in ProductHiddenAPIStubs but doesn't exist or doesn't produce
a dex jar.

Test: manual
Change-Id: I43643cbc5303536bfe0b02feedb03563ea0b540a
This commit is contained in:
Colin Cross 2019-04-02 13:03:46 -07:00
parent 9a4f3f7ea8
commit caa0e1e341
1 changed files with 1 additions and 1 deletions

View File

@ -159,9 +159,9 @@ func stubFlagsRule(ctx android.SingletonContext) {
for moduleList, pathList := range moduleListToPathList {
for i := range pathList {
if pathList[i] == nil {
pathList[i] = android.PathForOutput(ctx, "missing")
if ctx.Config().AllowMissingDependencies() {
missingDeps = append(missingDeps, (*moduleList)[i])
pathList[i] = android.PathForOutput(ctx, "missing")
} else {
ctx.Errorf("failed to find dex jar path for module %q",
(*moduleList)[i])