Merge "Remove unnecessary constraint on previous_api"

am: e4ef280532

Change-Id: I6951a5df42c4153c813a105f7fed5416a79edd61
This commit is contained in:
Paul Duffin 2019-11-11 09:03:35 -08:00 committed by android-build-merger
commit dc931028c5
1 changed files with 1 additions and 6 deletions

View File

@ -1325,13 +1325,8 @@ func (d *Droidstubs) annotationsFlags(ctx android.ModuleContext, cmd *android.Ru
validatingNullability :=
strings.Contains(d.Javadoc.args, "--validate-nullability-from-merged-stubs") ||
String(d.properties.Validate_nullability_from_list) != ""
migratingNullability := String(d.properties.Previous_api) != ""
if !(migratingNullability || validatingNullability) {
ctx.PropertyErrorf("previous_api",
"has to be non-empty if annotations was enabled (unless validating nullability)")
}
if migratingNullability {
previousApi := android.PathForModuleSrc(ctx, String(d.properties.Previous_api))
cmd.FlagWithInput("--migrate-nullness ", previousApi)