From 9d7c3fb4da9c40d956da0d2a6542eb17f292cf14 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 21 May 2020 10:11:31 +0100 Subject: [PATCH] Don't require merge_annotations_dir for annotations_enabled As far as I can tell, annotations_enabled does not require use of merge_annotations_dir (although it may have done in the past). Bug: 157010342 Test: m Change-Id: I6705522774203b4566f58679bbc2f0c17422c1dd Merged-In: I6705522774203b4566f58679bbc2f0c17422c1dd (cherry picked from commit c5e13279ad9d146e12d97f937afc45c958c1e3af) --- java/droiddoc.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/java/droiddoc.go b/java/droiddoc.go index b16c9cd72..d61c62c60 100644 --- a/java/droiddoc.go +++ b/java/droiddoc.go @@ -1334,13 +1334,10 @@ func (d *Droidstubs) annotationsFlags(ctx android.ModuleContext, cmd *android.Ru d.annotationsZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"_annotations.zip") cmd.FlagWithOutput("--extract-annotations ", d.annotationsZip) - if len(d.properties.Merge_annotations_dirs) == 0 { - ctx.PropertyErrorf("merge_annotations_dirs", - "has to be non-empty if annotations was enabled!") + if len(d.properties.Merge_annotations_dirs) != 0 { + d.mergeAnnoDirFlags(ctx, cmd) } - d.mergeAnnoDirFlags(ctx, cmd) - // TODO(tnorbye): find owners to fix these warnings when annotation was enabled. cmd.FlagWithArg("--hide ", "HiddenTypedefConstant"). FlagWithArg("--hide ", "SuperfluousPrefix").