summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2019-05-11 00:00:35 +0900
committer Jiyong Park <jiyong@google.com> 2019-05-11 12:40:50 +0900
commit6651eb21425fd7b7032f733ebad3d0d0961f097c (patch)
treeb33ee62a0e6c8138cabef5bf13ce416e02297763
parent60d2586b2caa32a712019f4d026b6183cf9203c2 (diff)
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 Change-Id: I6760f6e4068239361c495ae7c0de3e25f91d38e1
-rw-r--r--telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java18
-rw-r--r--telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java19
2 files changed, 37 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
index a9f10b1b460f..9f22d0a49806 100644
--- a/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
+++ b/telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java
@@ -549,4 +549,22 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub {
*/
public void onAppCallbackDied(int uid, int subscriptionId) {
}
+
+ // Following two methods exist to workaround b/124210145
+ /** @hide */
+ @SystemApi
+ @TestApi
+ @Override
+ public android.os.IBinder asBinder() {
+ return super.asBinder();
+ }
+
+ /** @hide */
+ @SystemApi
+ @TestApi
+ @Override
+ public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply,
+ int flags) throws RemoteException {
+ return super.onTransact(code, data, reply, flags);
+ }
}
diff --git a/telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java b/telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java
index 5ce612db49d6..cced44759527 100644
--- a/telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java
+++ b/telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java
@@ -294,4 +294,23 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub {
*/
public void onAppCallbackDied(int uid, int subscriptionId) {
}
+
+
+ // Following two methods exist to workaround b/124210145
+ /** @hide */
+ @SystemApi
+ @TestApi
+ @Override
+ public android.os.IBinder asBinder() {
+ return super.asBinder();
+ }
+
+ /** @hide */
+ @SystemApi
+ @TestApi
+ @Override
+ public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply,
+ int flags) throws RemoteException {
+ return super.onTransact(code, data, reply, flags);
+ }
}