From 629b9d287d61b44a587629c7c1176fcc2197590d Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Tue, 10 Oct 2023 17:50:25 +0100 Subject: [PATCH] Retain concrete overrides of abstract methods by default Bug: 299366704 Test: m checkapi Change-Id: I3d9fafefe90a98568c16d80c30e4d1d88a22c350 --- java/droidstubs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/droidstubs.go b/java/droidstubs.go index b059c0abf..5432ce7f5 100644 --- a/java/droidstubs.go +++ b/java/droidstubs.go @@ -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. // 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() { cmd.FlagWithArg("--hide-annotation ", "android.annotation.FlaggedApi")