diff --git a/compatibility_matrices/exclude/fcm_exclude.cpp b/compatibility_matrices/exclude/fcm_exclude.cpp index d8c9170000..1def7381ef 100644 --- a/compatibility_matrices/exclude/fcm_exclude.cpp +++ b/compatibility_matrices/exclude/fcm_exclude.cpp @@ -57,6 +57,7 @@ bool ShouldCheckMissingHalsInFcm(const std::string& package) { "android.hardware.graphics.common", "android.hardware.keymaster", "android.hardware.radio", + "android.hardware.uwb.fira_android", // Fastboot HAL is only used by recovery. Recovery is owned by OEM. Framework // does not depend on this HAL, hence it is not declared in any manifests or matrices. diff --git a/uwb/aidl/Android.bp b/uwb/aidl/Android.bp index 5d217537ab..0d1ebc23f3 100755 --- a/uwb/aidl/Android.bp +++ b/uwb/aidl/Android.bp @@ -17,6 +17,7 @@ aidl_interface { backend: { java: { sdk_version: "module_current", + enabled: false, }, ndk: { vndk: { @@ -37,3 +38,29 @@ aidl_interface { }, }, } + +aidl_interface { + name: "android.hardware.uwb.fira_android", + vendor_available: true, + srcs: ["android/hardware/uwb/fira_android/*.aidl"], + stability: "vintf", + backend: { + java: { + sdk_version: "module_current", + enabled: true, + apex_available: [ + "com.android.uwb", + ], + }, + ndk: { + vndk: { + enabled: true, + }, + apex_available: [ + "//apex_available:platform", + "com.android.uwb", + ], + min_sdk_version: "current", + }, + }, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorGids.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorGids.aidl new file mode 100644 index 0000000000..b0d88e0c94 --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorGids.aidl @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// 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.uwb.fira_android; +@Backing(type="byte") @VintfStability +enum UwbVendorGids { + ANDROID = 14, +} diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl new file mode 100644 index 0000000000..37b7efb321 --- /dev/null +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// 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.uwb.fira_android; +@Backing(type="int") @VintfStability +enum UwbVendorSessionSetAppConfigCmdParams { + CCC_RANGING_PROTOCOL_VER = 163, + CCC_UWB_CONFIG_ID = 164, + CCC_PULSESHAPE_COMBO = 165, + CCC_URSK_TTL = 166, +} diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorGids.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorGids.aidl new file mode 100644 index 0000000000..c7bc6b051c --- /dev/null +++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorGids.aidl @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.hardware.uwb.fira_android; + +/** + * Android specific vendor command GIDs (Group ID) should be defined here. + * + * For each vendor GID defined here, also create a corresponding AIDL file enumerating the + * OIDs (Opcode Identifier) allowed within that GID. + * For ex: VENDOR_GID_XXX = 1110b -> UwbVendorGidXXXOids.aidl + */ +@VintfStability +@Backing(type="byte") +enum UwbVendorGids { + /** + * Use values from the Proprietary Group range: 1110b – 1111b defined in Table 36 of + * UCI specification. + */ + + /** All Android specific commands/response/notification should use this GID */ + ANDROID = 0xE, +} diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl new file mode 100644 index 0000000000..850e2da490 --- /dev/null +++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.hardware.uwb.fira_android; + +/** + * Android specific vendor app params set in UCI command: + * GID: 0001b (UWB Session config Group) + * OID: 000011b (SESSION_SET_APP_CONFIG_CMD) + * + * Note: Refer to Table 34 of the UCI specification for the other params + * expected in this command. + */ +@VintfStability +@Backing(type="int") +enum UwbVendorSessionSetAppConfigCmdParams { + /** CCC params for ranging start */ + + /** Added in vendor version 0. */ + CCC_RANGING_PROTOCOL_VER = 0xA3, + CCC_UWB_CONFIG_ID = 0xA4, + CCC_PULSESHAPE_COMBO = 0xA5, + CCC_URSK_TTL = 0xA6, +} diff --git a/uwb/aidl/android/hardware/uwb/fira_android/readme.txt b/uwb/aidl/android/hardware/uwb/fira_android/readme.txt new file mode 100644 index 0000000000..6195427bb7 --- /dev/null +++ b/uwb/aidl/android/hardware/uwb/fira_android/readme.txt @@ -0,0 +1,13 @@ +The android.hardware.uwb.fira_android package is used to add any Android specific +additions to the UCI specification defined by FIRA standards body. These +additions should be added to the vendor specific portions carved out in the UCI +specification. + +These include: + - Android specific GIDs/OIDs for commands/responses/notifications. + - Andriod specific params in an existing UCI specified command/response/notification. + +All other interactions sent/received over the HAL interface is expected to +comply with the UCI specification that can be found here: +https://groups.firaconsortium.org/wg/Technical/document/folder/127 +(TODO(b/196004116): Link to the published specification)