From df6c25d518484e60477add216e597c54d3ca4b3c Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 20 Aug 2019 20:48:47 +0900 Subject: [PATCH] Remove -without-aidls filegroups for the media apex. When there is no *.aidl file in a filegroup, include path for the aidl compiler is not set to the path property of the filegroup. This blocks the plan to cut the dependency from API stubs libs to the framework, because then we have to rely on the include paths deducted from the input filegroups, rather than AIDL include paths exported from the framework. To make that happen, this change first removes the *-without-aidls filegroups and replace the reference to them with the corresponding file groups having AIDLs. Adding the AIDL files for media apex to the API stubs is fine because the AIDL files are @hidden ones. Bug: 70046217 Bug: 135922046 Test: m Exempt-From-Owner-Approval: Approved internally Merged-In: I794f6d0a7bcbef311d345d6e18ca311800af8ef4 (cherry picked from commit d2411f730f6d143d00b605312e632d0e41d9f632) Change-Id: I794f6d0a7bcbef311d345d6e18ca311800af8ef4 --- Android.bp | 4 ++-- media/Android.bp | 23 +++-------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/Android.bp b/Android.bp index 8a2c78b5186f8..379eedbfb3ee5 100644 --- a/Android.bp +++ b/Android.bp @@ -877,7 +877,7 @@ stubs_defaults { ":opt-telephony-srcs", ":opt-net-voip-srcs", ":core_public_api_files", - ":updatable-media-srcs-without-aidls", + ":updatable-media-srcs", "test-mock/src/**/*.java", "test-runner/src/**/*.java", ], @@ -940,7 +940,7 @@ stubs_defaults { ":opt-telephony-srcs", ":opt-net-voip-srcs", ":core_public_api_files", - ":updatable-media-srcs-without-aidls", + ":updatable-media-srcs", ], srcs_lib: "framework", srcs_lib_whitelist_pkgs: packages_to_document, diff --git a/media/Android.bp b/media/Android.bp index 4f9671f9936bf..6fa01bfa12937 100644 --- a/media/Android.bp +++ b/media/Android.bp @@ -42,13 +42,6 @@ filegroup { ], } -filegroup { - name: "updatable-media-srcs-without-aidls", - srcs : [ - ":mediasession2-srcs-without-aidls", - ], -} - filegroup { name: "mediasession2-srcs", srcs: [ @@ -67,18 +60,6 @@ filegroup { ], } -filegroup { - name: "mediasession2-srcs-without-aidls", - srcs: [ - ":mediasession2-srcs", - ], - exclude_srcs: [ - "apex/java/android/media/IMediaController2.aidl", - "apex/java/android/media/IMediaSession2.aidl", - "apex/java/android/media/IMediaSession2Service.aidl", - ], -} - filegroup { name: "mediaplayer2-srcs", srcs: [ @@ -96,6 +77,7 @@ filegroup { "apex/java/android/media/BufferingParams.java", "apex/java/android/media/ProxyDataSourceCallback.java", ], + path: "apex/java", } metalava_updatable_media_args = " --error UnhiddenSystemApi " + @@ -108,7 +90,7 @@ metalava_updatable_media_args = " --error UnhiddenSystemApi " + droidstubs { name: "updatable-media-stubs", srcs: [ - ":updatable-media-srcs-without-aidls", + ":updatable-media-srcs", ":framework-media-annotation-srcs", ], args: metalava_updatable_media_args, @@ -120,6 +102,7 @@ droidstubs { java_library { name: "updatable_media_stubs", srcs: [":updatable-media-stubs"], + // Ideally, sdk_version here should be "current_system", but "current - 1" is used // to avoid dependency cycle with framework. sdk_version: "28",