Merge "Match src paths with aidl package name"
diff --git a/camera/Android.bp b/camera/Android.bp
index 24b3918..e2c123c 100644
--- a/camera/Android.bp
+++ b/camera/Android.bp
@@ -87,6 +87,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
@@ -97,4 +98,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 011979e..c16fa6e 100644
--- a/media/libaudioclient/Android.bp
+++ b/media/libaudioclient/Android.bp
@@ -19,7 +19,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",
@@ -83,4 +83,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 7c0dab4..e5b5481 100644
--- a/media/libmedia/Android.bp
+++ b/media/libmedia/Android.bp
@@ -44,6 +44,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,
@@ -53,8 +62,7 @@
     double_loadable: true,
 
     srcs: [
-        "aidl/android/IGraphicBufferSource.aidl",
-        "aidl/android/IOMXBufferSource.aidl",
+        ":libmedia_omx_aidl",
 
         "IMediaCodecList.cpp",
         "IOMX.cpp",
@@ -150,6 +158,7 @@
     srcs: [
         "aidl/android/media/IMediaExtractorUpdateService.aidl",
     ],
+    path: "aidl",
 }
 
 cc_library {