From 6467209c131396d1c3a0f905292361e72514ae48 Mon Sep 17 00:00:00 2001 From: Dylan Tian Date: Fri, 10 Feb 2023 08:51:57 +0000 Subject: AIDL interface definition for Bluetooth Ext Bug: 260066902 Test: atest VtsHalBluetoothExtTargetTest Change-Id: I692bfb214d564a0aec0d0e371611bf08f65bfe0c --- bluetooth/ext/aidl/Android.bp | 30 ++++++++++++++++ .../google/bluetooth/ext/IBluetoothExt.aidl | 40 ++++++++++++++++++++++ .../google/bluetooth/ext/IBluetoothExt.aidl | 31 +++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 bluetooth/ext/aidl/Android.bp create mode 100644 bluetooth/ext/aidl/aidl_api/hardware.google.bluetooth.ext/current/hardware/google/bluetooth/ext/IBluetoothExt.aidl create mode 100644 bluetooth/ext/aidl/hardware/google/bluetooth/ext/IBluetoothExt.aidl diff --git a/bluetooth/ext/aidl/Android.bp b/bluetooth/ext/aidl/Android.bp new file mode 100644 index 0000000..00debbb --- /dev/null +++ b/bluetooth/ext/aidl/Android.bp @@ -0,0 +1,30 @@ +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +aidl_interface { + name: "hardware.google.bluetooth.ext", + owner: "google", + vendor_available: true, + srcs: [ + "hardware/google/bluetooth/ext/IBluetoothExt.aidl", + ], + stability: "vintf", + + backend: { + cpp: { + enabled: true, + }, + java: { + platform_apis: true, + }, + ndk: { + apex_available: [ + "//apex_available:platform", + "com.android.btservices", + ], + min_sdk_version: "33", + }, + }, +} diff --git a/bluetooth/ext/aidl/aidl_api/hardware.google.bluetooth.ext/current/hardware/google/bluetooth/ext/IBluetoothExt.aidl b/bluetooth/ext/aidl/aidl_api/hardware.google.bluetooth.ext/current/hardware/google/bluetooth/ext/IBluetoothExt.aidl new file mode 100644 index 0000000..839c726 --- /dev/null +++ b/bluetooth/ext/aidl/aidl_api/hardware.google.bluetooth.ext/current/hardware/google/bluetooth/ext/IBluetoothExt.aidl @@ -0,0 +1,40 @@ +/* + * Copyright 2023 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 is pixel only extension for Bluetooth HAL. + */ +/////////////////////////////////////////////////////////////////////////////// +// 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 hardware.google.bluetooth.ext; +@VintfStability +interface IBluetoothExt { + boolean setBluetoothCmdPacket(in char opcode, in byte[] params); +} diff --git a/bluetooth/ext/aidl/hardware/google/bluetooth/ext/IBluetoothExt.aidl b/bluetooth/ext/aidl/hardware/google/bluetooth/ext/IBluetoothExt.aidl new file mode 100644 index 0000000..4001489 --- /dev/null +++ b/bluetooth/ext/aidl/hardware/google/bluetooth/ext/IBluetoothExt.aidl @@ -0,0 +1,31 @@ +/* + * Copyright 2023 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 is pixel only extension for Bluetooth HAL. + */ +package hardware.google.bluetooth.ext; + +@VintfStability +interface IBluetoothExt { + /** + * API to set Bluetooth HCI packet + * + * @param opcode : Bluetooth HCI command opcode to be send + * @param params : Bluetooth HCI command parameters for the opcode + */ + boolean setBluetoothCmdPacket(in char opcode, in byte[] params); +} -- cgit v1.2.3 From 61c0a07a41132083e746b997cbe3102fc3e0a656 Mon Sep 17 00:00:00 2001 From: Bao Do Date: Sat, 7 Jan 2023 15:59:56 +0800 Subject: Add NDK backend and VTS Tag: #feature Bug: 244406135 Test: atest VtsHalBluetoothPofTargetTest Change-Id: I8646985b9b5b3ffa5636e8c12927778cb145e515 --- bluetooth/power_off_finder/OWNERS | 2 + bluetooth/power_off_finder/aidl/Android.bp | 7 ++ bluetooth/power_off_finder/aidl/vts/Android.bp | 44 ++++++++++ .../aidl/vts/VtsHalBluetoothPofTargetTest.cpp | 97 ++++++++++++++++++++++ .../aidl/vts/VtsHalBluetoothPofTargetTest.xml | 32 +++++++ 5 files changed, 182 insertions(+) create mode 100644 bluetooth/power_off_finder/OWNERS create mode 100644 bluetooth/power_off_finder/aidl/vts/Android.bp create mode 100644 bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp create mode 100644 bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.xml diff --git a/bluetooth/power_off_finder/OWNERS b/bluetooth/power_off_finder/OWNERS new file mode 100644 index 0000000..51a96c1 --- /dev/null +++ b/bluetooth/power_off_finder/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 27441 +quocbaodo@google.com diff --git a/bluetooth/power_off_finder/aidl/Android.bp b/bluetooth/power_off_finder/aidl/Android.bp index 46b0a34..ad40a9c 100644 --- a/bluetooth/power_off_finder/aidl/Android.bp +++ b/bluetooth/power_off_finder/aidl/Android.bp @@ -17,5 +17,12 @@ aidl_interface { java: { platform_apis: true, }, + ndk: { + apex_available: [ + "//apex_available:platform", + "com.android.btservices", + ], + min_sdk_version: "33", + }, }, } diff --git a/bluetooth/power_off_finder/aidl/vts/Android.bp b/bluetooth/power_off_finder/aidl/vts/Android.bp new file mode 100644 index 0000000..cf709de --- /dev/null +++ b/bluetooth/power_off_finder/aidl/vts/Android.bp @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_test { + name: "VtsHalBluetoothPofTargetTest", + defaults: [ + "use_libaidlvintf_gtest_helper_static", + ], + srcs: ["VtsHalBluetoothPofTargetTest.cpp"], + shared_libs: [ + "libbase", + "libcutils", + "libbinder_ndk", + "liblog", + "libutils", + "//hardware/google/interfaces:hardware.google.bluetooth.power_off_finder-V1-ndk", + ], + static_libs: [ + "libbluetooth-types", + ], + test_config: "VtsHalBluetoothPofTargetTest.xml", + test_suites: [ + "general-tests", + "vts", + ], +} diff --git a/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp b/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp new file mode 100644 index 0000000..6ed84a8 --- /dev/null +++ b/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp @@ -0,0 +1,97 @@ +/* + * Copyright 2023 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using ::aidl::hardware::google::bluetooth::power_off_finder::IBluetoothFinder; +using ::ndk::ScopedAStatus; + +class BluetoothPofTest : public ::testing::TestWithParam { +public: + virtual void SetUp() override; + virtual void TearDown() override; + + // test functions to call + ScopedAStatus sendAndCheckPrecomputedKeys(uint_t numKeys); + ScopedAStatus checkStartPowerOffMode(uint8_t startIndex); + +private: + std::shared_ptr bluetooth_pof; +}; + +void BluetoothPofTest::SetUp() { + ALOGI("SetUp POF Test"); + bluetooth_pof = IBluetoothFinder::fromBinder( + ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str()))); + ASSERT_NE(bluetooth_pof, nullptr); +} + +void BluetoothPofTest::TearDown() { + ALOGI("TearDown POF Test"); + bluetooth_pof = nullptr; + ASSERT_EQ(bluetooth_pof, nullptr); +} + +ScopedAStatus BluetoothPofTest::sendAndCheckPrecomputedKeys(uint_t numKeys) { + // creating mock keys + std::vector keys(20 * numKeys); + for (uint_t i = 0; i < keys.size(); ++i) + keys[i] = ((i / 20) + 1) & 0xff; + // sending keys to the controller + return bluetooth_pof->sendPrecomputedKeys(keys); +} + +ScopedAStatus BluetoothPofTest::checkStartPowerOffMode(uint8_t startIndex) { + return bluetooth_pof->startPoweredOffMode(startIndex); +} + +TEST_P(BluetoothPofTest, SendAndCheckPrecomputedKeySingle) { + ScopedAStatus status = sendAndCheckPrecomputedKeys(1); + ASSERT_TRUE(status.isOk()); +} + +TEST_P(BluetoothPofTest, SendAndCheckPrecomputedKeyManyKeys) { + ScopedAStatus status = sendAndCheckPrecomputedKeys(30); + ASSERT_TRUE(status.isOk()); +} + +TEST_P(BluetoothPofTest, StartPowerOffMode) { + ScopedAStatus status = checkStartPowerOffMode(0); + ASSERT_TRUE(status.isOk()); +} + +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BluetoothPofTest); +INSTANTIATE_TEST_SUITE_P(PerInstance, BluetoothPofTest, + testing::ValuesIn(android::getAidlHalInstanceNames( + IBluetoothFinder::descriptor)), + android::PrintInstanceNameToString); + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + ABinderProcess_startThreadPool(); + int status = RUN_ALL_TESTS(); + ALOGI("Test result = %d", status); + return status; +} diff --git a/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.xml b/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.xml new file mode 100644 index 0000000..006a99c --- /dev/null +++ b/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.xml @@ -0,0 +1,32 @@ + + + + -- cgit v1.2.3 From b6748577329abecad5396c0ae074733d21e191c6 Mon Sep 17 00:00:00 2001 From: Ted Wang Date: Tue, 21 Feb 2023 15:42:32 +0800 Subject: Add VTS for Bluetooth Ccc AIDL hal Bug: 260066902 Test: atest VtsHalBluetoothCccTargetTest Change-Id: Id32f6955b195f59d872c6f3e3c35ac230e5ef322 --- bluetooth/ccc/aidl/Android.bp | 7 ++ bluetooth/ccc/aidl/vts/Android.bp | 44 ++++++++ bluetooth/ccc/aidl/vts/OWNERS | 2 + .../ccc/aidl/vts/VtsHalBluetoothCccTargetTest.cpp | 121 +++++++++++++++++++++ .../ccc/aidl/vts/VtsHalBluetoothCccTargetTest.xml | 32 ++++++ 5 files changed, 206 insertions(+) create mode 100644 bluetooth/ccc/aidl/vts/Android.bp create mode 100644 bluetooth/ccc/aidl/vts/OWNERS create mode 100644 bluetooth/ccc/aidl/vts/VtsHalBluetoothCccTargetTest.cpp create mode 100644 bluetooth/ccc/aidl/vts/VtsHalBluetoothCccTargetTest.xml diff --git a/bluetooth/ccc/aidl/Android.bp b/bluetooth/ccc/aidl/Android.bp index 9b623ff..affe46b 100644 --- a/bluetooth/ccc/aidl/Android.bp +++ b/bluetooth/ccc/aidl/Android.bp @@ -17,5 +17,12 @@ aidl_interface { java: { platform_apis: true, }, + ndk: { + apex_available: [ + "//apex_available:platform", + "com.android.btservices", + ], + min_sdk_version: "33", + }, }, } diff --git a/bluetooth/ccc/aidl/vts/Android.bp b/bluetooth/ccc/aidl/vts/Android.bp new file mode 100644 index 0000000..e348939 --- /dev/null +++ b/bluetooth/ccc/aidl/vts/Android.bp @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_test { + name: "VtsHalBluetoothCccTargetTest", + defaults: [ + "use_libaidlvintf_gtest_helper_static", + ], + srcs: ["VtsHalBluetoothCccTargetTest.cpp"], + shared_libs: [ + "libbase", + "libcutils", + "libbinder_ndk", + "liblog", + "libutils", + ], + static_libs: [ + "//hardware/google/interfaces:hardware.google.bluetooth.ccc-V1-ndk", + "libbluetooth-types", + ], + test_config: "VtsHalBluetoothCccTargetTest.xml", + test_suites: [ + "general-tests", + "vts", + ], +} diff --git a/bluetooth/ccc/aidl/vts/OWNERS b/bluetooth/ccc/aidl/vts/OWNERS new file mode 100644 index 0000000..af657a8 --- /dev/null +++ b/bluetooth/ccc/aidl/vts/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 27441 +tedwang@google.com diff --git a/bluetooth/ccc/aidl/vts/VtsHalBluetoothCccTargetTest.cpp b/bluetooth/ccc/aidl/vts/VtsHalBluetoothCccTargetTest.cpp new file mode 100644 index 0000000..c39a2a6 --- /dev/null +++ b/bluetooth/ccc/aidl/vts/VtsHalBluetoothCccTargetTest.cpp @@ -0,0 +1,121 @@ +/* + * Copyright 2023 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +using ::aidl::hardware::google::bluetooth::ccc::IBluetoothCcc; +using ::aidl::hardware::google::bluetooth::ccc::IBluetoothCccCallback; +using ::aidl::hardware::google::bluetooth::ccc::Direction; +using ::aidl::hardware::google::bluetooth::ccc::LmpEventId; +using ::aidl::hardware::google::bluetooth::ccc::Timestamp; +using ::ndk::ScopedAStatus; + +class BluetoothCccTest : public ::testing::TestWithParam { + public: + class BluetoothCccCallback + : public ::aidl::hardware::google::bluetooth::ccc::BnBluetoothCccCallback { + public: + BluetoothCccCallback() = default; + + ::ndk::ScopedAStatus onEventGenerated(const Timestamp& /* timestamp */, + const std::array& /* address */, + Direction /* direction */, + LmpEventId /* lmpEventId */, + char16_t /* eventCounter */) override { + return ::ndk::ScopedAStatus::ok(); + } + + ::ndk::ScopedAStatus onRegistered(bool) override { + return ::ndk::ScopedAStatus::ok(); + } + }; + + virtual void SetUp() override { + ALOGI("SetUp Ccc Test"); + bluetooth_ccc = IBluetoothCcc::fromBinder( + ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str()))); + ASSERT_NE(bluetooth_ccc, nullptr); + + ccc_callback = ndk::SharedRefBase::make(); + ASSERT_NE(ccc_callback, nullptr); + } + + virtual void TearDown() override { + ALOGI("TearDown Ccc Test"); + bluetooth_ccc = nullptr; + ASSERT_EQ(bluetooth_ccc, nullptr); + } + + // test functions to call + ScopedAStatus registerForLmpEvents(std::array); + ScopedAStatus unregisterLmpEvents(std::array); + +private: + std::shared_ptr bluetooth_ccc; + std::shared_ptr ccc_callback; +}; + + +ScopedAStatus BluetoothCccTest::registerForLmpEvents(std::array addr) { + std::vector events = {LmpEventId::CONNECT_IND, + LmpEventId::LL_PHY_UPDATE_IND}; + return bluetooth_ccc->registerForLmpEvents(ccc_callback, std::array(addr), events); +} + +ScopedAStatus BluetoothCccTest::unregisterLmpEvents(std::array addr) { + return bluetooth_ccc->unregisterLmpEvents(std::array(addr)); +} + +TEST_P(BluetoothCccTest, RegisterForLmpEvents) { + ALOGI("Run test RegisterForLmpEvents"); + ScopedAStatus status = registerForLmpEvents( + std::array{0x11, 0x22, 0x33, 0x44, 0x55, 0x66}); + ASSERT_TRUE(status.isOk()); +} + +TEST_P(BluetoothCccTest, UnregisterLmpEvents) { + std::array addr = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; + ScopedAStatus status = registerForLmpEvents(addr); + ASSERT_TRUE(status.isOk()); + status = unregisterLmpEvents(addr); + ASSERT_TRUE(status.isOk()); +} + +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BluetoothCccTest); +INSTANTIATE_TEST_SUITE_P(PerInstance, BluetoothCccTest, + testing::ValuesIn(android::getAidlHalInstanceNames( + IBluetoothCcc::descriptor)), + android::PrintInstanceNameToString); + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + ABinderProcess_startThreadPool(); + int status = RUN_ALL_TESTS(); + ALOGI("Test result = %d", status); + return status; +} diff --git a/bluetooth/ccc/aidl/vts/VtsHalBluetoothCccTargetTest.xml b/bluetooth/ccc/aidl/vts/VtsHalBluetoothCccTargetTest.xml new file mode 100644 index 0000000..1b86379 --- /dev/null +++ b/bluetooth/ccc/aidl/vts/VtsHalBluetoothCccTargetTest.xml @@ -0,0 +1,32 @@ + + + + -- cgit v1.2.3 From 80fb480bca4fdeb600645934e49f4369612d68c1 Mon Sep 17 00:00:00 2001 From: Dylan Tian Date: Fri, 13 Jan 2023 05:45:12 +0000 Subject: AIDL interface definition for Bluetooth Channel Avoidance Bug: 260066902 Test: VTS tests Change-Id: Ic1e023cd1913fba3ea09406830689177de7f63c0 --- bluetooth/bt_channel_avoidance/aidl/Android.bp | 30 ++++++++++++++++ .../bt_channel_avoidance/IBTChannelAvoidance.aidl | 40 ++++++++++++++++++++++ .../bt_channel_avoidance/IBTChannelAvoidance.aidl | 36 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 bluetooth/bt_channel_avoidance/aidl/Android.bp create mode 100644 bluetooth/bt_channel_avoidance/aidl/aidl_api/hardware.google.bluetooth.bt_channel_avoidance/current/hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl create mode 100644 bluetooth/bt_channel_avoidance/aidl/hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl diff --git a/bluetooth/bt_channel_avoidance/aidl/Android.bp b/bluetooth/bt_channel_avoidance/aidl/Android.bp new file mode 100644 index 0000000..9895232 --- /dev/null +++ b/bluetooth/bt_channel_avoidance/aidl/Android.bp @@ -0,0 +1,30 @@ +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +aidl_interface { + name: "hardware.google.bluetooth.bt_channel_avoidance", + owner: "google", + vendor_available: true, + srcs: [ + "hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl", + ], + stability: "vintf", + + backend: { + cpp: { + enabled: true, + }, + java: { + platform_apis: true, + }, + ndk: { + apex_available: [ + "//apex_available:platform", + "com.android.btservices", + ], + min_sdk_version: "33", + }, + }, +} diff --git a/bluetooth/bt_channel_avoidance/aidl/aidl_api/hardware.google.bluetooth.bt_channel_avoidance/current/hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl b/bluetooth/bt_channel_avoidance/aidl/aidl_api/hardware.google.bluetooth.bt_channel_avoidance/current/hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl new file mode 100644 index 0000000..afd2053 --- /dev/null +++ b/bluetooth/bt_channel_avoidance/aidl/aidl_api/hardware.google.bluetooth.bt_channel_avoidance/current/hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl @@ -0,0 +1,40 @@ +/* + * Copyright 2023 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 is pixel only extension for Bluetooth HAL. + */ +/////////////////////////////////////////////////////////////////////////////// +// 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 hardware.google.bluetooth.bt_channel_avoidance; +@VintfStability +interface IBTChannelAvoidance { + oneway void setBluetoothChannelStatus(in byte[10] channelMap); +} diff --git a/bluetooth/bt_channel_avoidance/aidl/hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl b/bluetooth/bt_channel_avoidance/aidl/hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl new file mode 100644 index 0000000..425e315 --- /dev/null +++ b/bluetooth/bt_channel_avoidance/aidl/hardware/google/bluetooth/bt_channel_avoidance/IBTChannelAvoidance.aidl @@ -0,0 +1,36 @@ +/* + * Copyright 2023 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 is pixel only extension for Bluetooth HAL. + */ +package hardware.google.bluetooth.bt_channel_avoidance; + +@VintfStability +interface IBTChannelAvoidance { + /** + * API to set Bluetooth channel map. + * + * This API must be invoked whenever the Bluetooth channel map needs to be + * changed because Bluetooth channels have conflict with wifi or cellular. + * + * @param channelMap The lower 79 bits of the 80-bit parameter represents + * the status of 79 channels. 0 means the channel is bad and 1 means + * unknown. The most significant bit (bit 79) is reserved for future + * use. + */ + oneway void setBluetoothChannelStatus(in byte[10] channelMap); +} -- cgit v1.2.3 From 557a52d0b2a7e8edcf56e7cb591f0e83036fe107 Mon Sep 17 00:00:00 2001 From: Dylan Tian Date: Wed, 8 Feb 2023 07:15:29 +0000 Subject: AIDL interface definition for Bluetooth Ewp Bug: 260066902 Test: atest VtsHalBluetoothEwpTargetTest Change-Id: Id55fcfad882b18690c2c97ce5e438b73252fd00c --- bluetooth/ewp/aidl/Android.bp | 30 ++++++++++++++++ .../google/bluetooth/ewp/IBluetoothEwp.aidl | 41 ++++++++++++++++++++++ .../google/bluetooth/ewp/IBluetoothEwp.aidl | 35 ++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 bluetooth/ewp/aidl/Android.bp create mode 100644 bluetooth/ewp/aidl/aidl_api/hardware.google.bluetooth.ewp/current/hardware/google/bluetooth/ewp/IBluetoothEwp.aidl create mode 100644 bluetooth/ewp/aidl/hardware/google/bluetooth/ewp/IBluetoothEwp.aidl diff --git a/bluetooth/ewp/aidl/Android.bp b/bluetooth/ewp/aidl/Android.bp new file mode 100644 index 0000000..faa79ff --- /dev/null +++ b/bluetooth/ewp/aidl/Android.bp @@ -0,0 +1,30 @@ +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +aidl_interface { + name: "hardware.google.bluetooth.ewp", + owner: "google", + vendor_available: true, + srcs: [ + "hardware/google/bluetooth/ewp/IBluetoothEwp.aidl", + ], + stability: "vintf", + + backend: { + cpp: { + enabled: true, + }, + java: { + platform_apis: true, + }, + ndk: { + apex_available: [ + "//apex_available:platform", + "com.android.btservices", + ], + min_sdk_version: "33", + }, + }, +} diff --git a/bluetooth/ewp/aidl/aidl_api/hardware.google.bluetooth.ewp/current/hardware/google/bluetooth/ewp/IBluetoothEwp.aidl b/bluetooth/ewp/aidl/aidl_api/hardware.google.bluetooth.ewp/current/hardware/google/bluetooth/ewp/IBluetoothEwp.aidl new file mode 100644 index 0000000..4ec4bba --- /dev/null +++ b/bluetooth/ewp/aidl/aidl_api/hardware.google.bluetooth.ewp/current/hardware/google/bluetooth/ewp/IBluetoothEwp.aidl @@ -0,0 +1,41 @@ +/* + * Copyright 2023 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 is pixel only extension for Bluetooth HAL. + */ +/////////////////////////////////////////////////////////////////////////////// +// 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 hardware.google.bluetooth.ewp; +@VintfStability +interface IBluetoothEwp { + oneway void enableEwp(char eventMask); + oneway void disableEwp(); +} diff --git a/bluetooth/ewp/aidl/hardware/google/bluetooth/ewp/IBluetoothEwp.aidl b/bluetooth/ewp/aidl/hardware/google/bluetooth/ewp/IBluetoothEwp.aidl new file mode 100644 index 0000000..37297b8 --- /dev/null +++ b/bluetooth/ewp/aidl/hardware/google/bluetooth/ewp/IBluetoothEwp.aidl @@ -0,0 +1,35 @@ +/* + * Copyright 2023 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 is pixel only extension for Bluetooth HAL. + */ +package hardware.google.bluetooth.ewp; + +@VintfStability +interface IBluetoothEwp { + /** + * API to enable Bluetooth Le Audio offload debugging mechanism. + * + * @param eventMask Mask to enable different dump data + */ + oneway void enableEwp(char eventMask); + + /** + * API to disable Bluetooth Le Audio offload debugging mechanism. + */ + oneway void disableEwp(); +} -- cgit v1.2.3 From 277ea2282578b07bbeecba59e46cc428cc687e3a Mon Sep 17 00:00:00 2001 From: Dylan Tian Date: Fri, 10 Feb 2023 07:55:58 +0000 Subject: VTS for Bluetooth Ewp Bug: 260066902 Test: atest VtsHalBluetoothEwpTargetTest Change-Id: I18edb8dbb005f73f7380610261039942fb63be3e --- bluetooth/ewp/aidl/OWNERS | 2 + bluetooth/ewp/aidl/vts/Android.bp | 29 ++++++++ .../ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.cpp | 86 ++++++++++++++++++++++ .../ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.xml | 42 +++++++++++ 4 files changed, 159 insertions(+) create mode 100644 bluetooth/ewp/aidl/OWNERS create mode 100644 bluetooth/ewp/aidl/vts/Android.bp create mode 100644 bluetooth/ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.cpp create mode 100644 bluetooth/ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.xml diff --git a/bluetooth/ewp/aidl/OWNERS b/bluetooth/ewp/aidl/OWNERS new file mode 100644 index 0000000..e406ad5 --- /dev/null +++ b/bluetooth/ewp/aidl/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 27441 +tiand@google.com diff --git a/bluetooth/ewp/aidl/vts/Android.bp b/bluetooth/ewp/aidl/vts/Android.bp new file mode 100644 index 0000000..e77c527 --- /dev/null +++ b/bluetooth/ewp/aidl/vts/Android.bp @@ -0,0 +1,29 @@ +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_test { + name: "VtsHalBluetoothEwpTargetTest", + defaults: [ + "use_libaidlvintf_gtest_helper_static", + ], + srcs: ["VtsHalBluetoothEwpTargetTest.cpp"], + shared_libs: [ + "libbase", + "libcutils", + "libbinder_ndk", + "liblog", + "libutils", + "//hardware/google/interfaces:hardware.google.bluetooth.ewp-V1-ndk", + ], + static_libs: [ + "libbluetooth-types", + ], + test_config: "VtsHalBluetoothEwpTargetTest.xml", + test_suites: [ + "general-tests", + "vts", + ], +} + diff --git a/bluetooth/ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.cpp b/bluetooth/ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.cpp new file mode 100644 index 0000000..34dd807 --- /dev/null +++ b/bluetooth/ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.cpp @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2023 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +using aidl::hardware::google::bluetooth::ewp::IBluetoothEwp; +using ndk::ScopedAStatus; +using ndk::SpAIBinder; + +class BluetoothEwpTest : public ::testing::TestWithParam { +public: + virtual void SetUp() override; + virtual void TearDown() override; + + ndk::ScopedAStatus enableEwp(uint16_t event_mask); + ndk::ScopedAStatus disableEwp(); + +private: + std::shared_ptr bluetooth_ewp_; +}; + +void BluetoothEwpTest::SetUp() { + ALOGI("SetUp Bluetooth Ewp Test"); + bluetooth_ewp_ = IBluetoothEwp::fromBinder( + ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str()))); + ASSERT_NE(bluetooth_ewp_, nullptr); +} + +void BluetoothEwpTest::TearDown() { + ALOGI("TearDown Bluetooth Ewp Test"); + bluetooth_ewp_ = nullptr; + ASSERT_EQ(bluetooth_ewp_, nullptr); +} + +ndk::ScopedAStatus BluetoothEwpTest::enableEwp(uint16_t event_mask){ + return bluetooth_ewp_->enableEwp(event_mask); +} + +ndk::ScopedAStatus BluetoothEwpTest::disableEwp() { + return bluetooth_ewp_->disableEwp(); +} + +TEST_P(BluetoothEwpTest, enableEwp) { + uint16_t event_mask = 275; + ndk::ScopedAStatus status = enableEwp(event_mask); + ASSERT_TRUE(status.isOk()); +} + +TEST_P(BluetoothEwpTest, disableEwp) { + ndk::ScopedAStatus status = disableEwp(); + ASSERT_TRUE(status.isOk()); +} + +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BluetoothEwpTest); +INSTANTIATE_TEST_SUITE_P(PerInstance, BluetoothEwpTest, + testing::ValuesIn(android::getAidlHalInstanceNames( + IBluetoothEwp::descriptor)), + android::PrintInstanceNameToString); + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + ABinderProcess_startThreadPool(); + int status = RUN_ALL_TESTS(); + ALOGI("Test result = %d", status); + return status; +} + diff --git a/bluetooth/ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.xml b/bluetooth/ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.xml new file mode 100644 index 0000000..963d0d5 --- /dev/null +++ b/bluetooth/ewp/aidl/vts/VtsHalBluetoothEwpTargetTest.xml @@ -0,0 +1,42 @@ + + + + + -- cgit v1.2.3 From 3d074d466c25bf2e1cb6319ef83a614a51b937aa Mon Sep 17 00:00:00 2001 From: Dylan Tian Date: Tue, 7 Feb 2023 08:06:47 +0000 Subject: Vts for BT Channel Avoidance Bug: 260066902 Test: atest VtsHalBtChannelAvoidanceTargetTest Change-Id: I7d7fef480d1fa57a11c833626950213d178ea687 --- bluetooth/bt_channel_avoidance/aidl/OWNERS | 2 + bluetooth/bt_channel_avoidance/aidl/vts/Android.bp | 28 ++++++++ .../vts/VtsHalBTChannelAvoidanceTargetTest.cpp | 76 ++++++++++++++++++++++ .../vts/VtsHalBTChannelAvoidanceTargetTest.xml | 41 ++++++++++++ 4 files changed, 147 insertions(+) create mode 100644 bluetooth/bt_channel_avoidance/aidl/OWNERS create mode 100644 bluetooth/bt_channel_avoidance/aidl/vts/Android.bp create mode 100644 bluetooth/bt_channel_avoidance/aidl/vts/VtsHalBTChannelAvoidanceTargetTest.cpp create mode 100644 bluetooth/bt_channel_avoidance/aidl/vts/VtsHalBTChannelAvoidanceTargetTest.xml diff --git a/bluetooth/bt_channel_avoidance/aidl/OWNERS b/bluetooth/bt_channel_avoidance/aidl/OWNERS new file mode 100644 index 0000000..e406ad5 --- /dev/null +++ b/bluetooth/bt_channel_avoidance/aidl/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 27441 +tiand@google.com diff --git a/bluetooth/bt_channel_avoidance/aidl/vts/Android.bp b/bluetooth/bt_channel_avoidance/aidl/vts/Android.bp new file mode 100644 index 0000000..be2a6f6 --- /dev/null +++ b/bluetooth/bt_channel_avoidance/aidl/vts/Android.bp @@ -0,0 +1,28 @@ +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_test { + name: "VtsHalBTChannelAvoidanceTargetTest", + defaults: [ + "use_libaidlvintf_gtest_helper_static", + ], + srcs: ["VtsHalBTChannelAvoidanceTargetTest.cpp"], + shared_libs: [ + "libbase", + "libcutils", + "libbinder_ndk", + "liblog", + "libutils", + "//hardware/google/interfaces:hardware.google.bluetooth.bt_channel_avoidance-V1-ndk", + ], + static_libs: [ + "libbluetooth-types", + ], + test_config: "VtsHalBTChannelAvoidanceTargetTest.xml", + test_suites: [ + "general-tests", + "vts", + ], +} diff --git a/bluetooth/bt_channel_avoidance/aidl/vts/VtsHalBTChannelAvoidanceTargetTest.cpp b/bluetooth/bt_channel_avoidance/aidl/vts/VtsHalBTChannelAvoidanceTargetTest.cpp new file mode 100644 index 0000000..e6d8f14 --- /dev/null +++ b/bluetooth/bt_channel_avoidance/aidl/vts/VtsHalBTChannelAvoidanceTargetTest.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2023 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +using aidl::hardware::google::bluetooth::bt_channel_avoidance::IBTChannelAvoidance; +using ndk::ScopedAStatus; +using ndk::SpAIBinder; + +class BTChannelAvoidanceTest : public ::testing::TestWithParam { +public: + virtual void SetUp() override; + virtual void TearDown() override; + + ndk::ScopedAStatus setBluetoothChannelStatus(const std::array& channel_map); + +private: + std::shared_ptr bt_channel_avoidance_; +}; + +void BTChannelAvoidanceTest::SetUp() { + ALOGI("SetUp Bluetooth Channel Avoidance Test"); + bt_channel_avoidance_ = IBTChannelAvoidance::fromBinder( + ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str()))); + ASSERT_NE(bt_channel_avoidance_, nullptr); +} + +void BTChannelAvoidanceTest::TearDown() { + ALOGI("TearDown Bluetooth Channel Avoidance Test"); + bt_channel_avoidance_ = nullptr; + ASSERT_EQ(bt_channel_avoidance_, nullptr); +} + +ndk::ScopedAStatus BTChannelAvoidanceTest::setBluetoothChannelStatus(const std::array& channel_map) { + return bt_channel_avoidance_->setBluetoothChannelStatus(channel_map); +} + +TEST_P(BTChannelAvoidanceTest, setBluetoothChannelStatus) { + std::array channel_map = {127, 255, 255, 255, 255, 255, 255, 0, 0, 15}; + ndk::ScopedAStatus status = setBluetoothChannelStatus(channel_map); + ASSERT_TRUE(status.isOk()); +} + +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BTChannelAvoidanceTest); +INSTANTIATE_TEST_SUITE_P(PerInstance, BTChannelAvoidanceTest, + testing::ValuesIn(android::getAidlHalInstanceNames( + IBTChannelAvoidance::descriptor)), + android::PrintInstanceNameToString); + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + ABinderProcess_startThreadPool(); + int status = RUN_ALL_TESTS(); + ALOGI("Test result = %d", status); + return status; +} + diff --git a/bluetooth/bt_channel_avoidance/aidl/vts/VtsHalBTChannelAvoidanceTargetTest.xml b/bluetooth/bt_channel_avoidance/aidl/vts/VtsHalBTChannelAvoidanceTargetTest.xml new file mode 100644 index 0000000..eb76734 --- /dev/null +++ b/bluetooth/bt_channel_avoidance/aidl/vts/VtsHalBTChannelAvoidanceTargetTest.xml @@ -0,0 +1,41 @@ + + + + -- cgit v1.2.3 From 5dce91da4ba593408e2328e20bdc59183e198bfb Mon Sep 17 00:00:00 2001 From: Dylan Tian Date: Tue, 7 Feb 2023 08:27:02 +0000 Subject: Add ndk backend to Bluetooth SAR and make a small change to sendAreaCode function Bug: 260066902 Test: atest VtsHalBluetoothSarTargetTest Change-Id: I82e76a89fa77b8631fa6103e284d7cea8c07a2f5 --- bluetooth/sar/aidl/Android.bp | 15 ++++++++ .../aidl_api/hardware.google.bluetooth.sar/1/.hash | 1 + .../google/bluetooth/sar/IBluetoothSar.aidl | 42 ++++++++++++++++++++++ .../google/bluetooth/sar/IBluetoothSar.aidl | 2 +- .../google/bluetooth/sar/IBluetoothSar.aidl | 2 +- 5 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/1/.hash create mode 100644 bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/1/hardware/google/bluetooth/sar/IBluetoothSar.aidl diff --git a/bluetooth/sar/aidl/Android.bp b/bluetooth/sar/aidl/Android.bp index 557081e..66f7f12 100644 --- a/bluetooth/sar/aidl/Android.bp +++ b/bluetooth/sar/aidl/Android.bp @@ -17,5 +17,20 @@ aidl_interface { java: { platform_apis: true, }, + ndk: { + apex_available: [ + "//apex_available:platform", + "com.android.btservices", + ], + min_sdk_version: "33", + }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + frozen: true, + } diff --git a/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/1/.hash b/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/1/.hash new file mode 100644 index 0000000..76a0736 --- /dev/null +++ b/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/1/.hash @@ -0,0 +1 @@ +3c35bb863a7aef2b57076b4bc2fd28848df8edc0 diff --git a/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/1/hardware/google/bluetooth/sar/IBluetoothSar.aidl b/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/1/hardware/google/bluetooth/sar/IBluetoothSar.aidl new file mode 100644 index 0000000..4e32ff9 --- /dev/null +++ b/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/1/hardware/google/bluetooth/sar/IBluetoothSar.aidl @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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 hardware.google.bluetooth.sar; +@VintfStability +interface IBluetoothSar { + oneway void setBluetoothTxPowerCap(in byte cap); + oneway void setBluetoothTechBasedTxPowerCap(in byte brCap, in byte edrCap, in byte bleCap); + oneway void setBluetoothModeBasedTxPowerCap(in byte[3] chain0Cap, in byte[3] chain1Cap, in byte[6] beamformingCap); + oneway void setBluetoothModeBasedTxPowerCapPlusHR(in byte[4] chain0Cap, in byte[4] chain1Cap, in byte[8] beamformingCap); + oneway void setBluetoothAreaCode(in byte[3] areaCode); +} diff --git a/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/current/hardware/google/bluetooth/sar/IBluetoothSar.aidl b/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/current/hardware/google/bluetooth/sar/IBluetoothSar.aidl index a7b2d7f..4e32ff9 100644 --- a/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/current/hardware/google/bluetooth/sar/IBluetoothSar.aidl +++ b/bluetooth/sar/aidl/aidl_api/hardware.google.bluetooth.sar/current/hardware/google/bluetooth/sar/IBluetoothSar.aidl @@ -38,5 +38,5 @@ interface IBluetoothSar { oneway void setBluetoothTechBasedTxPowerCap(in byte brCap, in byte edrCap, in byte bleCap); oneway void setBluetoothModeBasedTxPowerCap(in byte[3] chain0Cap, in byte[3] chain1Cap, in byte[6] beamformingCap); oneway void setBluetoothModeBasedTxPowerCapPlusHR(in byte[4] chain0Cap, in byte[4] chain1Cap, in byte[8] beamformingCap); - oneway void setBluetoothAreaCode(in int areaCode); + oneway void setBluetoothAreaCode(in byte[3] areaCode); } diff --git a/bluetooth/sar/aidl/hardware/google/bluetooth/sar/IBluetoothSar.aidl b/bluetooth/sar/aidl/hardware/google/bluetooth/sar/IBluetoothSar.aidl index 023f634..96b37fc 100644 --- a/bluetooth/sar/aidl/hardware/google/bluetooth/sar/IBluetoothSar.aidl +++ b/bluetooth/sar/aidl/hardware/google/bluetooth/sar/IBluetoothSar.aidl @@ -93,5 +93,5 @@ interface IBluetoothSar { * between 0-899. 900-999 may be user-assigned by vendor to add further names * of countries, territories, or regions. */ - oneway void setBluetoothAreaCode(in int areaCode); + oneway void setBluetoothAreaCode(in byte[3] areaCode); } -- cgit v1.2.3 From e30af22174a3bcf38911e5daa4a28741378367d9 Mon Sep 17 00:00:00 2001 From: Dylan Tian Date: Tue, 7 Feb 2023 08:28:15 +0000 Subject: VTS for Bluetooth Sar Bug: 260066902 Test: atest VtsHalBluetoothSarTargetTest Change-Id: I87bf7dfeac9e2a2e17168c8956214e39371cae70 --- bluetooth/sar/aidl/OWNERS | 2 + bluetooth/sar/aidl/vts/Android.bp | 28 +++++ .../sar/aidl/vts/VtsHalBluetoothSarTargetTest.cpp | 137 +++++++++++++++++++++ .../sar/aidl/vts/VtsHalBluetoothSarTargetTest.xml | 42 +++++++ 4 files changed, 209 insertions(+) create mode 100644 bluetooth/sar/aidl/OWNERS create mode 100644 bluetooth/sar/aidl/vts/Android.bp create mode 100644 bluetooth/sar/aidl/vts/VtsHalBluetoothSarTargetTest.cpp create mode 100644 bluetooth/sar/aidl/vts/VtsHalBluetoothSarTargetTest.xml diff --git a/bluetooth/sar/aidl/OWNERS b/bluetooth/sar/aidl/OWNERS new file mode 100644 index 0000000..e406ad5 --- /dev/null +++ b/bluetooth/sar/aidl/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 27441 +tiand@google.com diff --git a/bluetooth/sar/aidl/vts/Android.bp b/bluetooth/sar/aidl/vts/Android.bp new file mode 100644 index 0000000..ace79d3 --- /dev/null +++ b/bluetooth/sar/aidl/vts/Android.bp @@ -0,0 +1,28 @@ +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_test { + name: "VtsHalBluetoothSarTargetTest", + defaults: [ + "use_libaidlvintf_gtest_helper_static", + ], + srcs: ["VtsHalBluetoothSarTargetTest.cpp"], + shared_libs: [ + "libbase", + "libcutils", + "libbinder_ndk", + "liblog", + "libutils", + "//hardware/google/interfaces:hardware.google.bluetooth.sar-V1-ndk", + ], + static_libs: [ + "libbluetooth-types", + ], + test_config: "VtsHalBluetoothSarTargetTest.xml", + test_suites: [ + "general-tests", + "vts", + ], +} diff --git a/bluetooth/sar/aidl/vts/VtsHalBluetoothSarTargetTest.cpp b/bluetooth/sar/aidl/vts/VtsHalBluetoothSarTargetTest.cpp new file mode 100644 index 0000000..817c953 --- /dev/null +++ b/bluetooth/sar/aidl/vts/VtsHalBluetoothSarTargetTest.cpp @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2023 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +using aidl::hardware::google::bluetooth::sar::IBluetoothSar; +using ndk::ScopedAStatus; +using ndk::SpAIBinder; + +class BluetoothSarTest : public ::testing::TestWithParam { +public: + virtual void SetUp() override; + virtual void TearDown() override; + + ndk::ScopedAStatus setAndCheckBluetoothTxPowerCap(int8_t cap); + ndk::ScopedAStatus setAndCheckBluetoothTechBasedTxPowerCap(int8_t br_cap, int8_t edr_cap, int8_t ble_cap); + ndk::ScopedAStatus setAndCheckBluetoothModeBasedTxPowerCap(const std::array& chain_0_cap, const std::array& chain_1_cap, const std::array& beamforming_cap); + ndk::ScopedAStatus setAndCheckBluetoothModeBasedTxPowerCapPlusHR(const std::array& chain_0_cap, const std::array& chain_1_cap, const std::array& beamforming_cap); + ndk::ScopedAStatus setAndCheckBluetoothAreaCode(const std::array& area_code); + +private: + std::shared_ptr bluetooth_sar_; +}; + +void BluetoothSarTest::SetUp() { + ALOGI("SetUp Bluetooth SAR Test"); + bluetooth_sar_ = IBluetoothSar::fromBinder( + ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str()))); + ASSERT_NE(bluetooth_sar_, nullptr); +} + +void BluetoothSarTest::TearDown() { + ALOGI("TearDown Bluetooth SAR Test"); + bluetooth_sar_ = nullptr; + ASSERT_EQ(bluetooth_sar_, nullptr); +} + +ndk::ScopedAStatus BluetoothSarTest::setAndCheckBluetoothTxPowerCap(int8_t cap) { + return bluetooth_sar_->setBluetoothTxPowerCap(cap); +} + +ndk::ScopedAStatus BluetoothSarTest::setAndCheckBluetoothTechBasedTxPowerCap( + int8_t br_cap, int8_t edr_cap, int8_t ble_cap) { + return bluetooth_sar_->setBluetoothTechBasedTxPowerCap(br_cap, edr_cap, ble_cap); +} + +ndk::ScopedAStatus BluetoothSarTest::setAndCheckBluetoothModeBasedTxPowerCap( + const std::array& chain_0_cap, + const std::array& chain_1_cap, + const std::array& beamforming_cap) { + return bluetooth_sar_->setBluetoothModeBasedTxPowerCap(chain_0_cap, chain_1_cap, beamforming_cap); +} + + +ndk::ScopedAStatus BluetoothSarTest::setAndCheckBluetoothModeBasedTxPowerCapPlusHR( + const std::array& chain_0_cap, + const std::array& chain_1_cap, + const std::array& beamforming_cap){ + return bluetooth_sar_->setBluetoothModeBasedTxPowerCapPlusHR(chain_0_cap, chain_1_cap, beamforming_cap); +} + +TEST_P(BluetoothSarTest, setAndCheckBluetoothTxPowerCap) { + ndk::ScopedAStatus status = setAndCheckBluetoothTxPowerCap(40); + ASSERT_TRUE(status.isOk()); + // check invalid power cap (greater than 80) + status = setAndCheckBluetoothTxPowerCap(100); + ASSERT_FALSE(status.isOk()); +} + + +TEST_P(BluetoothSarTest, setAndCheckBluetoothTechBasedTxPowerCap) { + ndk::ScopedAStatus status = setAndCheckBluetoothTechBasedTxPowerCap(10, 20, 30); + ASSERT_TRUE(status.isOk()); + // check invalid power cap (greater than 80) + status = setAndCheckBluetoothTechBasedTxPowerCap(10, 120, 30); + ASSERT_FALSE(status.isOk()); +} + +TEST_P(BluetoothSarTest, setAndCheckBluetoothModeBasedTxPowerCap) { + std::array chain_0_cap = {10, 20, 30}; + std::array chain_1_cap = {15, 25, 35}; + std::array beamforming_cap = {10, 20, 30, 40, 50, 60}; + ndk::ScopedAStatus status = + setAndCheckBluetoothModeBasedTxPowerCap(chain_0_cap, chain_1_cap, beamforming_cap); + ASSERT_TRUE(status.isOk()); + // check invalid power cap (greater than 80) + std::array bad_cap = {15, 125, 35}; + status = setAndCheckBluetoothModeBasedTxPowerCap(chain_0_cap, bad_cap, beamforming_cap); + ASSERT_FALSE(status.isOk()); +} + +TEST_P(BluetoothSarTest, setAndCheckBluetoothModeBasedTxPowerCapPlusHR) { + std::array chain_0_cap = {10, 20, 30, 40}; + std::array chain_1_cap = {15, 25, 35, 45}; + std::array beamforming_cap = {10, 20, 30, 40, 50, 60, 70, 80}; + ndk::ScopedAStatus status = + setAndCheckBluetoothModeBasedTxPowerCapPlusHR(chain_0_cap, chain_1_cap, beamforming_cap); + ASSERT_TRUE(status.isOk()); + // check invalid power cap (greater than 80) + std::array bad_cap = {10, 20, 30, 200}; + status = setAndCheckBluetoothModeBasedTxPowerCapPlusHR(bad_cap, chain_1_cap, beamforming_cap); + ASSERT_FALSE(status.isOk()); +} + +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BluetoothSarTest); +INSTANTIATE_TEST_SUITE_P(PerInstance, BluetoothSarTest, + testing::ValuesIn(android::getAidlHalInstanceNames( + IBluetoothSar::descriptor)), + android::PrintInstanceNameToString); + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + ABinderProcess_startThreadPool(); + int status = RUN_ALL_TESTS(); + ALOGI("Test result = %d", status); + return status; +} diff --git a/bluetooth/sar/aidl/vts/VtsHalBluetoothSarTargetTest.xml b/bluetooth/sar/aidl/vts/VtsHalBluetoothSarTargetTest.xml new file mode 100644 index 0000000..cb14573 --- /dev/null +++ b/bluetooth/sar/aidl/vts/VtsHalBluetoothSarTargetTest.xml @@ -0,0 +1,42 @@ + + + + + -- cgit v1.2.3 From dd73eab931b612b25a5ae1ff778f7ab1865933b8 Mon Sep 17 00:00:00 2001 From: Dylan Tian Date: Mon, 13 Mar 2023 08:26:57 +0000 Subject: VTS for Bluetooth Ext Bug: 260066902 Test: atest VtsHalBluetoothExtTargetTest Change-Id: I6f49ea04058c189933098bcca579ad8a6afff231 --- bluetooth/ext/aidl/OWNERS | 2 + bluetooth/ext/aidl/vts/Android.bp | 27 +++++++ .../ext/aidl/vts/VtsHalBluetoothExtTargetTest.cpp | 83 ++++++++++++++++++++++ .../ext/aidl/vts/VtsHalBluetoothExtTargetTest.xml | 41 +++++++++++ 4 files changed, 153 insertions(+) create mode 100644 bluetooth/ext/aidl/OWNERS create mode 100644 bluetooth/ext/aidl/vts/Android.bp create mode 100644 bluetooth/ext/aidl/vts/VtsHalBluetoothExtTargetTest.cpp create mode 100644 bluetooth/ext/aidl/vts/VtsHalBluetoothExtTargetTest.xml diff --git a/bluetooth/ext/aidl/OWNERS b/bluetooth/ext/aidl/OWNERS new file mode 100644 index 0000000..e406ad5 --- /dev/null +++ b/bluetooth/ext/aidl/OWNERS @@ -0,0 +1,2 @@ +# Bug component: 27441 +tiand@google.com diff --git a/bluetooth/ext/aidl/vts/Android.bp b/bluetooth/ext/aidl/vts/Android.bp new file mode 100644 index 0000000..983424f --- /dev/null +++ b/bluetooth/ext/aidl/vts/Android.bp @@ -0,0 +1,27 @@ +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["Android-Apache-2.0"], +} +cc_test { + name: "VtsHalBluetoothExtTargetTest", + defaults: [ + "use_libaidlvintf_gtest_helper_static", + ], + srcs: ["VtsHalBluetoothExtTargetTest.cpp"], + shared_libs: [ + "libbase", + "libcutils", + "libbinder_ndk", + "liblog", + "libutils", + "//hardware/google/interfaces:hardware.google.bluetooth.ext-V1-ndk", + ], + static_libs: [ + "libbluetooth-types", + ], + test_config: "VtsHalBluetoothExtTargetTest.xml", + test_suites: [ + "general-tests", + "vts", + ], +} diff --git a/bluetooth/ext/aidl/vts/VtsHalBluetoothExtTargetTest.cpp b/bluetooth/ext/aidl/vts/VtsHalBluetoothExtTargetTest.cpp new file mode 100644 index 0000000..55abbd8 --- /dev/null +++ b/bluetooth/ext/aidl/vts/VtsHalBluetoothExtTargetTest.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2023 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +using aidl::hardware::google::bluetooth::ext::IBluetoothExt; +using ndk::ScopedAStatus; +using ndk::SpAIBinder; + +class BluetoothExtTest : public ::testing::TestWithParam { +public: + virtual void SetUp() override; + virtual void TearDown() override; + + ndk::ScopedAStatus setBluetoothCmdPacket(uint16_t opcode, const std::vector& params, bool* ret_ptr); + +private: + std::shared_ptr bluetooth_ext_; +}; + +void BluetoothExtTest::SetUp() { + ALOGI("SetUp Bluetooth Ext Test"); + bluetooth_ext_ = IBluetoothExt::fromBinder( + ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str()))); + ASSERT_NE(bluetooth_ext_, nullptr); +} + +void BluetoothExtTest::TearDown() { + ALOGI("Tear Down Bluetooth Ext Test"); + bluetooth_ext_ = nullptr; + ASSERT_EQ(bluetooth_ext_, nullptr); +} + +ndk::ScopedAStatus BluetoothExtTest::setBluetoothCmdPacket(uint16_t opcode, const std::vector& params, bool* ret_ptr) { + ndk::ScopedAStatus status = bluetooth_ext_->setBluetoothCmdPacket(opcode, params, ret_ptr); + if (!(*ret_ptr)) { + return ndk::ScopedAStatus::fromServiceSpecificError(STATUS_BAD_VALUE); + } + return status; +} + +TEST_P(BluetoothExtTest, setBluetoothCmdPacket) { + uint16_t opcode = 0xfe20; + std::vector params = {0x20, 0xfe, 0x08, 0x14, 0x01, 0xff, 0x00, 0x10, 0x00, 0x01, 0x00}; + bool is_valid_packet = false; + ndk::ScopedAStatus status = setBluetoothCmdPacket(opcode, params, &is_valid_packet); + ASSERT_TRUE(is_valid_packet); + ASSERT_TRUE(status.isOk()); +} + +GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(BluetoothExtTest); +INSTANTIATE_TEST_SUITE_P(PerInstance, BluetoothExtTest, + testing::ValuesIn(android::getAidlHalInstanceNames( + IBluetoothExt::descriptor)), + android::PrintInstanceNameToString); + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + ABinderProcess_startThreadPool(); + int status = RUN_ALL_TESTS(); + ALOGI("Test result = %d", status); + return status; +} + diff --git a/bluetooth/ext/aidl/vts/VtsHalBluetoothExtTargetTest.xml b/bluetooth/ext/aidl/vts/VtsHalBluetoothExtTargetTest.xml new file mode 100644 index 0000000..4e8b3d9 --- /dev/null +++ b/bluetooth/ext/aidl/vts/VtsHalBluetoothExtTargetTest.xml @@ -0,0 +1,41 @@ + + + + -- cgit v1.2.3 From 25fe266a96f52dbb578b2192e52355a97cb7d2d7 Mon Sep 17 00:00:00 2001 From: sergiuferentz Date: Mon, 25 Sep 2023 15:04:37 +0000 Subject: Bump android.hardware.graphics.common V4->V5 Test: Build Bug: 291142745 Change-Id: I7781212c1de6cb3fbef43a290616e39896c0f456 --- display/Android.bp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/display/Android.bp b/display/Android.bp index b146a54..23ca30a 100644 --- a/display/Android.bp +++ b/display/Android.bp @@ -15,7 +15,7 @@ aidl_interface { imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], backend: { @@ -31,63 +31,63 @@ aidl_interface { version: "1", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, { version: "2", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, { version: "3", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, { version: "4", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, { version: "5", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, { version: "6", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, { version: "7", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, { version: "8", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, { version: "9", imports: [ "android.hardware.common-V2", - "android.hardware.graphics.common-V4", + "android.hardware.graphics.common-V5", ], }, -- cgit v1.2.3 From 1be324de9a45bb89338da08fb573035be5ecb5db Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Wed, 4 Oct 2023 07:36:06 +0000 Subject: Update pixel-display V10 interface * Add blockingRoi in the HistogramConfig. For the histogram client uses V10 or later interface, it can either skip the blockingRoi field or set with (0, 0, 0, 0) to disable blocking ROI. Otherwise, the blocking ROI will be enabled. For the histogram client uses V9 interface, blockingRoi will be null by default. * HistogramController will implement the disable ROI. In order to capture the histogram of the entire screen, histogram client can either specify the ROI with screen coordinates or set ROI with (0, 0, 0, 0) to disable the ROI. Bug: 299410182 Test: Build pass Change-Id: I5ef20244163d48811d8789539f2d72f9697f05c2 Signed-off-by: Leo Chen --- display/Android.bp | 7 +++ .../com.google.hardware.pixel.display/10/.hash | 1 + .../google/hardware/pixel/display/HbmState.aidl | 40 ++++++++++++++ .../pixel/display/HistogramCapability.aidl | 43 +++++++++++++++ .../hardware/pixel/display/HistogramConfig.aidl | 41 ++++++++++++++ .../hardware/pixel/display/HistogramErrorCode.aidl | 51 ++++++++++++++++++ .../hardware/pixel/display/HistogramPos.aidl | 39 ++++++++++++++ .../hardware/pixel/display/HistogramSamplePos.aidl | 39 ++++++++++++++ .../google/hardware/pixel/display/IDisplay.aidl | 62 ++++++++++++++++++++++ .../google/hardware/pixel/display/LbeState.aidl | 42 +++++++++++++++ .../pixel/display/PanelCalibrationStatus.aidl | 40 ++++++++++++++ .../google/hardware/pixel/display/Priority.aidl | 39 ++++++++++++++ .../com/google/hardware/pixel/display/Weight.aidl | 40 ++++++++++++++ .../pixel/display/HistogramCapability.aidl | 1 + .../hardware/pixel/display/HistogramConfig.aidl | 1 + .../pixel/display/HistogramCapability.aidl | 6 +++ .../hardware/pixel/display/HistogramConfig.aidl | 13 +++++ 17 files changed, 505 insertions(+) create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/.hash create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HbmState.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramCapability.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramConfig.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramErrorCode.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramPos.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramSamplePos.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/IDisplay.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/LbeState.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/PanelCalibrationStatus.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/Priority.aidl create mode 100644 display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/Weight.aidl diff --git a/display/Android.bp b/display/Android.bp index 23ca30a..31542e9 100644 --- a/display/Android.bp +++ b/display/Android.bp @@ -90,6 +90,13 @@ aidl_interface { "android.hardware.graphics.common-V5", ], }, + { + version: "10", + imports: [ + "android.hardware.common-V2", + "android.hardware.graphics.common-V5", + ], + }, ], frozen: true, diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/.hash b/display/aidl_api/com.google.hardware.pixel.display/10/.hash new file mode 100644 index 0000000..fd6bc86 --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/.hash @@ -0,0 +1 @@ +baba07b678d5de541a70f3c4b7b3c03bd78d5d3a diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HbmState.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HbmState.aidl new file mode 100644 index 0000000..76af8b3 --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HbmState.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2020 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 com.google.hardware.pixel.display; +@Backing(type="byte") @VintfStability +enum HbmState { + OFF = 0, + HDR = 1, + SUNLIGHT = 2, +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramCapability.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramCapability.aidl new file mode 100644 index 0000000..bf4a34c --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramCapability.aidl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2023 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 com.google.hardware.pixel.display; +@VintfStability +parcelable HistogramCapability { + boolean supportMultiChannel; + int channelCount; + int fullResolutionWidth; + int fullResolutionHeight; + com.google.hardware.pixel.display.HistogramSamplePos[] supportSamplePosList; + boolean supportBlockingRoi; +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramConfig.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramConfig.aidl new file mode 100644 index 0000000..a5fe1d4 --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramConfig.aidl @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2023 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 com.google.hardware.pixel.display; +@VintfStability +parcelable HistogramConfig { + android.hardware.graphics.common.Rect roi; + com.google.hardware.pixel.display.Weight weights; + com.google.hardware.pixel.display.HistogramSamplePos samplePos; + @nullable android.hardware.graphics.common.Rect blockingRoi; +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramErrorCode.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramErrorCode.aidl new file mode 100644 index 0000000..6c8bca7 --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramErrorCode.aidl @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2022 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 com.google.hardware.pixel.display; +@Backing(type="byte") @VintfStability +enum HistogramErrorCode { + NONE = 0, + BAD_ROI = 1, + BAD_WEIGHT = 2, + BAD_POSITION = 3, + BAD_PRIORITY = 4, + ENABLE_HIST_ERROR = 5, + DISABLE_HIST_ERROR = 6, + BAD_HIST_DATA = 7, + DRM_PLAYING = 8, + DISPLAY_POWEROFF = 9, + API_DEPRECATED = 10, + BAD_TOKEN = 11, + CONFIG_HIST_ERROR = 12, + NO_CHANNEL_AVAILABLE = 13, +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramPos.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramPos.aidl new file mode 100644 index 0000000..20b8160 --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramPos.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 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 com.google.hardware.pixel.display; +@Backing(type="byte") @VintfStability +enum HistogramPos { + POST = 0, + PRE = 1, +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramSamplePos.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramSamplePos.aidl new file mode 100644 index 0000000..0acc055 --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/HistogramSamplePos.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2023 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 com.google.hardware.pixel.display; +@Backing(type="byte") @VintfStability +enum HistogramSamplePos { + POST_POSTPROC = 0, + PRE_POSTPROC = 1, +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/IDisplay.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/IDisplay.aidl new file mode 100644 index 0000000..7a54c1c --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/IDisplay.aidl @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2022 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 com.google.hardware.pixel.display; +@VintfStability +interface IDisplay { + boolean isHbmSupported(); + void setHbmState(in com.google.hardware.pixel.display.HbmState state); + com.google.hardware.pixel.display.HbmState getHbmState(); + boolean isLbeSupported(); + void setLbeState(in com.google.hardware.pixel.display.LbeState state); + void setLbeAmbientLight(in int ambientLux); + com.google.hardware.pixel.display.LbeState getLbeState(); + boolean isLhbmSupported(); + void setLhbmState(in boolean enabled); + boolean getLhbmState(); + int setCompensationImageHandle(in android.hardware.common.NativeHandle native_handle, in String imageName); + int setMinIdleRefreshRate(in int fps); + int setRefreshRateThrottle(in int delayMs); + com.google.hardware.pixel.display.HistogramErrorCode histogramSample(in android.hardware.graphics.common.Rect roi, in com.google.hardware.pixel.display.Weight weight, in com.google.hardware.pixel.display.HistogramPos pos, in com.google.hardware.pixel.display.Priority pri, out char[] histogrambuffer); + com.google.hardware.pixel.display.PanelCalibrationStatus getPanelCalibrationStatus(); + boolean isDbmSupported(); + void setDbmState(in boolean enabled); + void setPeakRefreshRate(in int rate); + void setLowPowerMode(in boolean enabled); + boolean isOperationRateSupported(); + com.google.hardware.pixel.display.HistogramCapability getHistogramCapability(); + com.google.hardware.pixel.display.HistogramErrorCode registerHistogram(in IBinder token, in com.google.hardware.pixel.display.HistogramConfig histogramConfig); + com.google.hardware.pixel.display.HistogramErrorCode queryHistogram(in IBinder token, out char[] histogramBuffer); + com.google.hardware.pixel.display.HistogramErrorCode reconfigHistogram(in IBinder token, in com.google.hardware.pixel.display.HistogramConfig histogramConfig); + com.google.hardware.pixel.display.HistogramErrorCode unregisterHistogram(in IBinder token); +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/LbeState.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/LbeState.aidl new file mode 100644 index 0000000..8c8b53e --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/LbeState.aidl @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2020 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 com.google.hardware.pixel.display; +@Backing(type="byte") @VintfStability +enum LbeState { + OFF = 0, + NORMAL = 1, + HIGH_BRIGHTNESS = 2, + POWER_SAVE = 3, + HIGH_BRIGHTNESS_ENHANCE = 4, +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/PanelCalibrationStatus.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/PanelCalibrationStatus.aidl new file mode 100644 index 0000000..55271d0 --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/PanelCalibrationStatus.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2022 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 com.google.hardware.pixel.display; +@Backing(type="byte") @VintfStability +enum PanelCalibrationStatus { + ORIGINAL = 0, + GOLDEN = 1, + UNCALIBRATED = 2, +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/Priority.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/Priority.aidl new file mode 100644 index 0000000..2b2c957 --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/Priority.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2022 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 com.google.hardware.pixel.display; +@Backing(type="byte") @VintfStability +enum Priority { + NORMAL = 0, + PRIORITY = 1, +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/Weight.aidl b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/Weight.aidl new file mode 100644 index 0000000..e25da1e --- /dev/null +++ b/display/aidl_api/com.google.hardware.pixel.display/10/com/google/hardware/pixel/display/Weight.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2022 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 com.google.hardware.pixel.display; +@VintfStability +parcelable Weight { + char weightR; + char weightG; + char weightB; +} diff --git a/display/aidl_api/com.google.hardware.pixel.display/current/com/google/hardware/pixel/display/HistogramCapability.aidl b/display/aidl_api/com.google.hardware.pixel.display/current/com/google/hardware/pixel/display/HistogramCapability.aidl index bbae60d..bf4a34c 100644 --- a/display/aidl_api/com.google.hardware.pixel.display/current/com/google/hardware/pixel/display/HistogramCapability.aidl +++ b/display/aidl_api/com.google.hardware.pixel.display/current/com/google/hardware/pixel/display/HistogramCapability.aidl @@ -39,4 +39,5 @@ parcelable HistogramCapability { int fullResolutionWidth; int fullResolutionHeight; com.google.hardware.pixel.display.HistogramSamplePos[] supportSamplePosList; + boolean supportBlockingRoi; } diff --git a/display/aidl_api/com.google.hardware.pixel.display/current/com/google/hardware/pixel/display/HistogramConfig.aidl b/display/aidl_api/com.google.hardware.pixel.display/current/com/google/hardware/pixel/display/HistogramConfig.aidl index c72f349..a5fe1d4 100644 --- a/display/aidl_api/com.google.hardware.pixel.display/current/com/google/hardware/pixel/display/HistogramConfig.aidl +++ b/display/aidl_api/com.google.hardware.pixel.display/current/com/google/hardware/pixel/display/HistogramConfig.aidl @@ -37,4 +37,5 @@ parcelable HistogramConfig { android.hardware.graphics.common.Rect roi; com.google.hardware.pixel.display.Weight weights; com.google.hardware.pixel.display.HistogramSamplePos samplePos; + @nullable android.hardware.graphics.common.Rect blockingRoi; } diff --git a/display/com/google/hardware/pixel/display/HistogramCapability.aidl b/display/com/google/hardware/pixel/display/HistogramCapability.aidl index ea6e312..ad6a8a8 100644 --- a/display/com/google/hardware/pixel/display/HistogramCapability.aidl +++ b/display/com/google/hardware/pixel/display/HistogramCapability.aidl @@ -51,4 +51,10 @@ parcelable HistogramCapability { * supportSamplePosList lists the supported histogram sample position. */ HistogramSamplePos[] supportSamplePosList; + + /** + * supportBlockingRoi is true means the server support blocking ROI. Otherwise, + * the client should not use the blocking ROI. + */ + boolean supportBlockingRoi; } diff --git a/display/com/google/hardware/pixel/display/HistogramConfig.aidl b/display/com/google/hardware/pixel/display/HistogramConfig.aidl index 4798447..34df010 100644 --- a/display/com/google/hardware/pixel/display/HistogramConfig.aidl +++ b/display/com/google/hardware/pixel/display/HistogramConfig.aidl @@ -28,6 +28,8 @@ parcelable HistogramConfig { * calculated based on the full resolution which is described by * getHistogramCapability. Note that the right and bottom coordinates are * exclusive. + * Note: (0, 0, 0, 0) means the ROI is disabled, histogram hardware will + * capture the region inside the entire screen but outside the blocking ROI. */ Rect roi; @@ -44,4 +46,15 @@ parcelable HistogramConfig { * (before post processing) or POST_POSTPROC (after post processing). */ HistogramSamplePos samplePos; + + /** + * blockingRoi is the ROI blocking region. The histogram inside blockingRoi + * is not captured even that region lies within the roi. Rect is represented + * by the (int) coordinates of its 4 edges (left, top, right, bottom). + * The coordinates should be calculated based on the full resolution which + * is described by getHistogramCapability. Note that the right and bottom + * coordinates are exclusive. + * Note: (0, 0, 0, 0) means the blocking ROI is disabled. + */ + @nullable Rect blockingRoi; } -- cgit v1.2.3 From 9f975d4f594929a4e2e43e801354f68fc6585015 Mon Sep 17 00:00:00 2001 From: timtmlin Date: Fri, 10 Nov 2023 00:03:43 +0800 Subject: freeze hardware.google.ril_ext AIDL Bug: 309171980 Test: E911 call connected over wi-fi with VZW SIM Change-Id: I381a0edece5a2241b8e88442945df15006874e8a --- ril_ext/Android.bp | 8 ++++ ril_ext/aidl_api/hardware.google.ril_ext/1/.hash | 1 + .../1/hardware/google/ril_ext/CarrierConfig.aidl | 49 ++++++++++++++++++++++ .../1/hardware/google/ril_ext/IRilExt.aidl | 40 ++++++++++++++++++ .../hardware/google/ril_ext/IRilExtIndication.aidl | 39 +++++++++++++++++ .../1/hardware/google/ril_ext/IRilExtResponse.aidl | 39 +++++++++++++++++ .../1/hardware/google/ril_ext/RilError.aidl | 41 ++++++++++++++++++ .../1/hardware/google/ril_ext/RilResponseInfo.aidl | 39 +++++++++++++++++ 8 files changed, 256 insertions(+) create mode 100644 ril_ext/aidl_api/hardware.google.ril_ext/1/.hash create mode 100644 ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/CarrierConfig.aidl create mode 100644 ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExt.aidl create mode 100644 ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExtIndication.aidl create mode 100644 ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExtResponse.aidl create mode 100644 ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/RilError.aidl create mode 100644 ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/RilResponseInfo.aidl diff --git a/ril_ext/Android.bp b/ril_ext/Android.bp index 63ecd37..97f61c5 100644 --- a/ril_ext/Android.bp +++ b/ril_ext/Android.bp @@ -19,4 +19,12 @@ aidl_interface { enabled: true, }, }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], + frozen: true, + } diff --git a/ril_ext/aidl_api/hardware.google.ril_ext/1/.hash b/ril_ext/aidl_api/hardware.google.ril_ext/1/.hash new file mode 100644 index 0000000..c9c1d39 --- /dev/null +++ b/ril_ext/aidl_api/hardware.google.ril_ext/1/.hash @@ -0,0 +1 @@ +585f9549747efe73bb7a8ec7cb4216c7e513613e diff --git a/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/CarrierConfig.aidl b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/CarrierConfig.aidl new file mode 100644 index 0000000..b863898 --- /dev/null +++ b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/CarrierConfig.aidl @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2023 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 hardware.google.ril_ext; +@VintfStability +parcelable CarrierConfig { + String configKey; + hardware.google.ril_ext.CarrierConfig.ConfigValue configValue; + union ConfigValue { + boolean boolValue; + boolean[] boolArray; + int intValue; + int[] intArray; + long longValue; + long[] longArray; + String stringValue; + String[] stringArray; + } +} diff --git a/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExt.aidl b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExt.aidl new file mode 100644 index 0000000..7dcbfa1 --- /dev/null +++ b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExt.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2023 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 hardware.google.ril_ext; +@VintfStability +interface IRilExt { + void setCallback(in hardware.google.ril_ext.IRilExtResponse rilExtResponse, in hardware.google.ril_ext.IRilExtIndication rilExtIndication); + void sendCarrierId(in int serial, in int carrierId); + void sendCarrierConfigs(in int serial, in hardware.google.ril_ext.CarrierConfig[] carrierConfigs); +} diff --git a/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExtIndication.aidl b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExtIndication.aidl new file mode 100644 index 0000000..2db2705 --- /dev/null +++ b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExtIndication.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2023 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 hardware.google.ril_ext; +@VintfStability +interface IRilExtIndication { + void registerCarrierConfigChange(in String[] registeredKeys, in String[] unregisteredKeys); + void triggerBugreport(in String title); +} diff --git a/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExtResponse.aidl b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExtResponse.aidl new file mode 100644 index 0000000..a5dfb2b --- /dev/null +++ b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/IRilExtResponse.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2023 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 hardware.google.ril_ext; +@VintfStability +interface IRilExtResponse { + void sendCarrierIdResponse(in hardware.google.ril_ext.RilResponseInfo info); + void sendCarrierConfigsResponse(in hardware.google.ril_ext.RilResponseInfo info); +} diff --git a/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/RilError.aidl b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/RilError.aidl new file mode 100644 index 0000000..66ec05f --- /dev/null +++ b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/RilError.aidl @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2023 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 hardware.google.ril_ext; +@Backing(type="int") @JavaDerive(toString=true) @VintfStability +enum RilError { + NONE = 0, + GENERIC_FAILURE = 1, + REQUEST_NOT_SUPPORTED = 2, + NO_MEMORY = 3, +} diff --git a/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/RilResponseInfo.aidl b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/RilResponseInfo.aidl new file mode 100644 index 0000000..88e8648 --- /dev/null +++ b/ril_ext/aidl_api/hardware.google.ril_ext/1/hardware/google/ril_ext/RilResponseInfo.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2023 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 hardware.google.ril_ext; +@JavaDerive(toString=true) @VintfStability +parcelable RilResponseInfo { + int serial; + hardware.google.ril_ext.RilError error; +} -- cgit v1.2.3