Retain concrete overrides of abstract methods by default

Bug: 299366704
Test: m checkapi
Change-Id: I3d9fafefe90a98568c16d80c30e4d1d88a22c350
This commit is contained in:
Paul Duffin 2023-10-10 17:50:25 +01:00
parent 57e60bf82b
commit 629b9d287d

View file

@ -538,7 +538,9 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
// Force metalava to sort overloaded methods by their order in the source code. // Force metalava to sort overloaded methods by their order in the source code.
// See b/285312164 for more information. // See b/285312164 for more information.
cmd.FlagWithArg("--format-defaults ", "overloaded-method-order=source") // And add concrete overrides of abstract methods, see b/299366704 for more
// information.
cmd.FlagWithArg("--format-defaults ", "overloaded-method-order=source,add-additional-overrides=yes")
if ctx.DeviceConfig().HideFlaggedApis() { if ctx.DeviceConfig().HideFlaggedApis() {
cmd.FlagWithArg("--hide-annotation ", "android.annotation.FlaggedApi") cmd.FlagWithArg("--hide-annotation ", "android.annotation.FlaggedApi")