Match src paths with aidl package name
In order for the build system to track updates to the header files
during incremental builds, always specify the src files using the same
path as the package for C++ compilations.
Bug: 112114177
Test: m
Change-Id: I5fb25124a26f190c462e2e60fc75a88d48643c10
diff --git a/camera/Android.bp b/camera/Android.bp
index 2800595..b288bcf 100644
--- a/camera/Android.bp
+++ b/camera/Android.bp
@@ -86,6 +86,7 @@
"aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl",
"aidl/android/hardware/camera2/ICameraDeviceUser.aidl",
],
+ path: "aidl",
}
// Extra AIDL files that are used by framework.jar but not libcamera_client
@@ -96,4 +97,5 @@
"aidl/android/hardware/ICamera.aidl",
"aidl/android/hardware/ICameraClient.aidl",
],
+ path: "aidl",
}
diff --git a/media/libaudioclient/Android.bp b/media/libaudioclient/Android.bp
index 03bd6ce..c516d20 100644
--- a/media/libaudioclient/Android.bp
+++ b/media/libaudioclient/Android.bp
@@ -42,7 +42,7 @@
// AIDL files for audioclient interfaces
// The headers for these interfaces will be available to any modules that
// include libaudioclient, at the path "aidl/package/path/BnFoo.h"
- "aidl/android/media/IAudioRecord.aidl",
+ ":libaudioclient_aidl_private",
":libaudioclient_aidl",
"AudioEffect.cpp",
@@ -110,4 +110,15 @@
srcs: [
"aidl/android/media/IPlayer.aidl",
],
+ path: "aidl",
+}
+
+// Used to strip the "aidl/" from the path, so the build system can predict the
+// output filename.
+filegroup {
+ name: "libaudioclient_aidl_private",
+ srcs: [
+ "aidl/android/media/IAudioRecord.aidl",
+ ],
+ path: "aidl",
}
diff --git a/media/libmedia/Android.bp b/media/libmedia/Android.bp
index 1d33590..d141287 100644
--- a/media/libmedia/Android.bp
+++ b/media/libmedia/Android.bp
@@ -47,6 +47,15 @@
clang: true,
}
+filegroup {
+ name: "libmedia_omx_aidl",
+ srcs: [
+ "aidl/android/IGraphicBufferSource.aidl",
+ "aidl/android/IOMXBufferSource.aidl",
+ ],
+ path: "aidl",
+}
+
cc_library_shared {
name: "libmedia_omx",
vendor_available: true,
@@ -56,8 +65,7 @@
double_loadable: true,
srcs: [
- "aidl/android/IGraphicBufferSource.aidl",
- "aidl/android/IOMXBufferSource.aidl",
+ ":libmedia_omx_aidl",
"IMediaCodecList.cpp",
"IOMX.cpp",