Skip to content
Commit d7d472ad authored by Jiyong Park's avatar Jiyong Park
Browse files

Add workaround for b/124210145

Problem description:
Metalava emits signature of a method under a class, even when the method
is not defined in the class when the method is inherited from a hidden
ancestor and the method is part of the public interface that the class
is expected to implement.

To be specific, inside the api signature, MmbmsDownloadServiceBase has
asBinder() and onTransact(). The methods are not defined in the class
but inherited from the auto-generated hidden class
IMbmsDownloadService.Stub. However, since the methods are also declared
in the public ancestors of the class, e.g., Binder and IInterface,
the methods are force-included in the class. Omitting the methods will
cause problem when building the stub version of the class.

This inclusion of the inherited method is breaking
SystemApiAnnotationTest. That's because the test ensures that a symbol
listed in the API signature file for the System API is actually
annotated with @SystemApi.

Solution:
To workaround the issue, actually implement the auto-generated methods
inside the class and annotate them.

Bug: 124210145
Test: atest CtsSystemApiAnnotationTestCases
Merged-In: I6760f6e4068239361c495ae7c0de3e25f91d38e1
Change-Id: I6760f6e4068239361c495ae7c0de3e25f91d38e1
(cherry picked from commit 6651eb21)
parent 4fb04e8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment