From faeab0faa7ff42eba8935d90e3f69581229002da Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Fri, 14 Sep 2018 21:17:46 -0700 Subject: [PATCH] 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 --- camera/Android.bp | 2 ++ media/libaudioclient/Android.bp | 13 ++++++++++++- media/libmedia/Android.bp | 12 ++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/camera/Android.bp b/camera/Android.bp index 2800595f4a..b288bcfce0 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -86,6 +86,7 @@ filegroup { "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 @@ filegroup { "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 03bd6ce945..c516d20f2b 100644 --- a/media/libaudioclient/Android.bp +++ b/media/libaudioclient/Android.bp @@ -42,7 +42,7 @@ cc_library_shared { // 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 @@ filegroup { 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 1d335901c5..d1412874f1 100644 --- a/media/libmedia/Android.bp +++ b/media/libmedia/Android.bp @@ -47,6 +47,15 @@ cc_library { 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 @@ cc_library_shared { double_loadable: true, srcs: [ - "aidl/android/IGraphicBufferSource.aidl", - "aidl/android/IOMXBufferSource.aidl", + ":libmedia_omx_aidl", "IMediaCodecList.cpp", "IOMX.cpp",