From 7ae4255438c5b187186416e2a5c84842eeed1192 Mon Sep 17 00:00:00 2001 From: Arthur Ishiguro Date: Thu, 6 Jan 2022 19:39:47 +0000 Subject: [PATCH] Adjust Context Hub AIDL based on feedback - Add additional documentation of ContextHubMessage.aidl. - Remove redundant TYPE_ specifier in HostEndpointInfo.aidl. Bug: 213474931 Test: Compile Change-Id: Ice1ac925a8b977abee8a9fa376ad40b33f315a3f --- .../android/hardware/contexthub/HostEndpointInfo.aidl | 4 ++-- .../android/hardware/contexthub/ContextHubMessage.aidl | 8 ++++++-- .../android/hardware/contexthub/HostEndpointInfo.aidl | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/HostEndpointInfo.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/HostEndpointInfo.aidl index e7dcbc706d..84e8531eb9 100644 --- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/HostEndpointInfo.aidl +++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/HostEndpointInfo.aidl @@ -40,7 +40,7 @@ parcelable HostEndpointInfo { @nullable String attributionTag; @Backing(type="int") @VintfStability enum Type { - TYPE_FRAMEWORK = 1, - TYPE_APP = 2, + FRAMEWORK = 1, + APP = 2, } } diff --git a/contexthub/aidl/android/hardware/contexthub/ContextHubMessage.aidl b/contexthub/aidl/android/hardware/contexthub/ContextHubMessage.aidl index 867da2f9c0..95d478e6c2 100644 --- a/contexthub/aidl/android/hardware/contexthub/ContextHubMessage.aidl +++ b/contexthub/aidl/android/hardware/contexthub/ContextHubMessage.aidl @@ -32,10 +32,14 @@ parcelable ContextHubMessage { */ char hostEndPoint; - /** The type of this message */ + /** + * The type of this message payload, defined by the communication endpoints (i.e. + * either the nanoapp or the host endpoint). This value can be used to distinguish + * the handling of messageBody (e.g. for decoding). + */ int messageType; - /** The payload containing the message */ + /** The payload containing the message. */ byte[] messageBody; /** diff --git a/contexthub/aidl/android/hardware/contexthub/HostEndpointInfo.aidl b/contexthub/aidl/android/hardware/contexthub/HostEndpointInfo.aidl index 40a231d804..a9d6657097 100644 --- a/contexthub/aidl/android/hardware/contexthub/HostEndpointInfo.aidl +++ b/contexthub/aidl/android/hardware/contexthub/HostEndpointInfo.aidl @@ -37,12 +37,12 @@ parcelable HostEndpointInfo { @Backing(type="int") enum Type { /** - This endpoint is from the Android framework, where packageName and attributionTag may be - empty. + * This endpoint is from the Android framework, where packageName and attributionTag may be + * empty. */ - TYPE_FRAMEWORK = 1, + FRAMEWORK = 1, /** This endpoint is an Android app. */ - TYPE_APP = 2, + APP = 2, } }