From 14b2cbe96d5ce7e328090161861a19995bd891ee Mon Sep 17 00:00:00 2001 From: Devin Moore Date: Fri, 9 Oct 2020 10:46:38 -0700 Subject: [PATCH 1/2] Move AIDL FMQ types from android.hardware.common Moved the types to andrdoid.hardware.common.fmq. This allows modules to depend on the unstable version of the library without conflicting with modules that depend on the stable version of android.hardware.common. Test: atest fmq_unit_tests fmq_test Bug: 142326204 Change-Id: I3091f52c4e763a15fd9a1b7451a1455a06fb4c30 --- common/fmq/aidl/Android.bp | 21 +++++++++++++++++++ .../common/fmq}/GrantorDescriptor.aidl | 2 +- .../hardware/common/fmq}/MQDescriptor.aidl | 4 ++-- .../common/fmq}/SynchronizedReadWrite.aidl | 2 +- .../common/fmq}/UnsynchronizedWrite.aidl | 2 +- .../common/fmq}/GrantorDescriptor.aidl | 2 +- .../hardware/common/fmq}/MQDescriptor.aidl | 4 ++-- .../common/fmq}/SynchronizedReadWrite.aidl | 2 +- .../common/fmq}/UnsynchronizedWrite.aidl | 2 +- tests/msgq/1.0/default/Android.bp | 2 +- 10 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 common/fmq/aidl/Android.bp rename common/{aidl/aidl_api/android.hardware.common/current/android/hardware/common => fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq}/GrantorDescriptor.aidl (96%) rename common/{aidl/aidl_api/android.hardware.common/current/android/hardware/common => fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq}/MQDescriptor.aidl (92%) rename common/{aidl/aidl_api/android.hardware.common/current/android/hardware/common => fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq}/SynchronizedReadWrite.aidl (96%) rename common/{aidl/aidl_api/android.hardware.common/current/android/hardware/common => fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq}/UnsynchronizedWrite.aidl (96%) rename common/{aidl/android/hardware/common => fmq/aidl/android/hardware/common/fmq}/GrantorDescriptor.aidl (96%) rename common/{aidl/android/hardware/common => fmq/aidl/android/hardware/common/fmq}/MQDescriptor.aidl (94%) rename common/{aidl/android/hardware/common => fmq/aidl/android/hardware/common/fmq}/SynchronizedReadWrite.aidl (96%) rename common/{aidl/android/hardware/common => fmq/aidl/android/hardware/common/fmq}/UnsynchronizedWrite.aidl (96%) diff --git a/common/fmq/aidl/Android.bp b/common/fmq/aidl/Android.bp new file mode 100644 index 0000000000..004adab514 --- /dev/null +++ b/common/fmq/aidl/Android.bp @@ -0,0 +1,21 @@ +aidl_interface { + name: "android.hardware.common.fmq", + host_supported: true, + vendor_available: true, + vndk: { + enabled: true, + support_system_process: true, + }, + srcs: [ + "android/hardware/common/fmq/*.aidl", + ], + stability: "vintf", + backend: { + java: { + enabled: false, + }, + cpp: { + enabled: false, + }, + }, +} diff --git a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/GrantorDescriptor.aidl b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/GrantorDescriptor.aidl similarity index 96% rename from common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/GrantorDescriptor.aidl rename to common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/GrantorDescriptor.aidl index 07bceb0e06..7ac1930715 100644 --- a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/GrantorDescriptor.aidl +++ b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/GrantorDescriptor.aidl @@ -15,7 +15,7 @@ // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. -package android.hardware.common; +package android.hardware.common.fmq; @VintfStability parcelable GrantorDescriptor { int offset; diff --git a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/MQDescriptor.aidl b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/MQDescriptor.aidl similarity index 92% rename from common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/MQDescriptor.aidl rename to common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/MQDescriptor.aidl index c9fe1d7e8d..26073691f1 100644 --- a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/MQDescriptor.aidl +++ b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/MQDescriptor.aidl @@ -15,10 +15,10 @@ // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. -package android.hardware.common; +package android.hardware.common.fmq; @VintfStability parcelable MQDescriptor { - android.hardware.common.GrantorDescriptor[] grantors; + android.hardware.common.fmq.GrantorDescriptor[] grantors; ParcelFileDescriptor fileDescriptor; int quantum; int flags; diff --git a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/SynchronizedReadWrite.aidl b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/SynchronizedReadWrite.aidl similarity index 96% rename from common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/SynchronizedReadWrite.aidl rename to common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/SynchronizedReadWrite.aidl index aec3d6dfd3..2142bdbd13 100644 --- a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/SynchronizedReadWrite.aidl +++ b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/SynchronizedReadWrite.aidl @@ -15,7 +15,7 @@ // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. -package android.hardware.common; +package android.hardware.common.fmq; @VintfStability enum SynchronizedReadWrite { EMPTY = 0, diff --git a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/UnsynchronizedWrite.aidl b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/UnsynchronizedWrite.aidl similarity index 96% rename from common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/UnsynchronizedWrite.aidl rename to common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/UnsynchronizedWrite.aidl index e390d20bce..1220674e13 100644 --- a/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/UnsynchronizedWrite.aidl +++ b/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/android/hardware/common/fmq/UnsynchronizedWrite.aidl @@ -15,7 +15,7 @@ // with such a backward incompatible change, it has a high risk of breaking // later when a module using the interface is updated, e.g., Mainline modules. -package android.hardware.common; +package android.hardware.common.fmq; @VintfStability enum UnsynchronizedWrite { EMPTY = 0, diff --git a/common/aidl/android/hardware/common/GrantorDescriptor.aidl b/common/fmq/aidl/android/hardware/common/fmq/GrantorDescriptor.aidl similarity index 96% rename from common/aidl/android/hardware/common/GrantorDescriptor.aidl rename to common/fmq/aidl/android/hardware/common/fmq/GrantorDescriptor.aidl index 3552e9e847..ca69d94d55 100644 --- a/common/aidl/android/hardware/common/GrantorDescriptor.aidl +++ b/common/fmq/aidl/android/hardware/common/fmq/GrantorDescriptor.aidl @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.hardware.common; +package android.hardware.common.fmq; /* * Included in MQDescriptor, for use with libfmq. diff --git a/common/aidl/android/hardware/common/MQDescriptor.aidl b/common/fmq/aidl/android/hardware/common/fmq/MQDescriptor.aidl similarity index 94% rename from common/aidl/android/hardware/common/MQDescriptor.aidl rename to common/fmq/aidl/android/hardware/common/fmq/MQDescriptor.aidl index 7e89b15f56..82917d6fbe 100644 --- a/common/aidl/android/hardware/common/MQDescriptor.aidl +++ b/common/fmq/aidl/android/hardware/common/fmq/MQDescriptor.aidl @@ -14,9 +14,9 @@ * limitations under the License. */ -package android.hardware.common; +package android.hardware.common.fmq; -import android.hardware.common.GrantorDescriptor; +import android.hardware.common.fmq.GrantorDescriptor; /* * For use with libfmq. This is created from an instance of AidlMessageQueue, diff --git a/common/aidl/android/hardware/common/SynchronizedReadWrite.aidl b/common/fmq/aidl/android/hardware/common/fmq/SynchronizedReadWrite.aidl similarity index 96% rename from common/aidl/android/hardware/common/SynchronizedReadWrite.aidl rename to common/fmq/aidl/android/hardware/common/fmq/SynchronizedReadWrite.aidl index ef93bf2aba..8c334423e0 100644 --- a/common/aidl/android/hardware/common/SynchronizedReadWrite.aidl +++ b/common/fmq/aidl/android/hardware/common/fmq/SynchronizedReadWrite.aidl @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.hardware.common; +package android.hardware.common.fmq; /* * For use with android.hardware.common.MQDescriptor to specify which type of diff --git a/common/aidl/android/hardware/common/UnsynchronizedWrite.aidl b/common/fmq/aidl/android/hardware/common/fmq/UnsynchronizedWrite.aidl similarity index 96% rename from common/aidl/android/hardware/common/UnsynchronizedWrite.aidl rename to common/fmq/aidl/android/hardware/common/fmq/UnsynchronizedWrite.aidl index aa27c8d029..24c4cce74c 100644 --- a/common/aidl/android/hardware/common/UnsynchronizedWrite.aidl +++ b/common/fmq/aidl/android/hardware/common/fmq/UnsynchronizedWrite.aidl @@ -14,7 +14,7 @@ * limitations under the License. */ -package android.hardware.common; +package android.hardware.common.fmq; /* * For use with android.hardware.common.MQDescriptor to specify which type of diff --git a/tests/msgq/1.0/default/Android.bp b/tests/msgq/1.0/default/Android.bp index 9c1b3f9e53..6e7cd4478b 100644 --- a/tests/msgq/1.0/default/Android.bp +++ b/tests/msgq/1.0/default/Android.bp @@ -93,7 +93,7 @@ cc_test { static_libs: [ "android.hardware.tests.msgq@1.0", "android.fmq.test-ndk_platform", - "android.hardware.common-unstable-ndk_platform", + "android.hardware.common.fmq-unstable-ndk_platform", ], whole_static_libs: [ "android.hardware.tests.msgq@1.0-impl", From 23a52ecdb9be6d09d3d5a0baab1bb9d2f93c30a0 Mon Sep 17 00:00:00 2001 From: Devin Moore Date: Fri, 9 Oct 2020 13:37:12 -0700 Subject: [PATCH 2/2] Add android.hardware.common.fmq to fcm_exclude There is no top level interface in this package. Test: m Bug: 142326204 Change-Id: I895561ba265ea534b2da1f29f1d3056d0a9e452d --- compatibility_matrices/exclude/fcm_exclude.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp index 459a6e2fc8..0eff450348 100644 --- a/compatibility_matrices/exclude/fcm_exclude.cpp +++ b/compatibility_matrices/exclude/fcm_exclude.cpp @@ -52,6 +52,7 @@ bool ShouldCheckMissingHalsInFcm(const std::string& package) { "android.hardware.radio.config@1.2", // AIDL "android.hardware.common", + "android.hardware.common.fmq", "android.hardware.graphics.common", "android.hardware.keymaster",