diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-06-01 05:42:09 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-06-01 05:42:09 +0000 |
commit | fe239d975ec6ebb2ff3d21740e51a841c30ac1f2 (patch) | |
tree | 1eefeea1202bb5ea03a31679001aaced02df7e30 | |
parent | 367e46ff1d3d1545a2f8ca6fea63b9ba16a23751 (diff) | |
parent | 3c64c5024d4eac14e053411ea18d57345c5694c5 (diff) | |
download | interfaces-fe239d975ec6ebb2ff3d21740e51a841c30ac1f2.tar.gz |
Merge "Remove POF HAL" into udc-dev am: 3c64c5024d
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/interfaces/+/23443316
Change-Id: I7d9b9cef9f5264732fc5d15ecc4517a28a568863
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
7 files changed, 0 insertions, 270 deletions
diff --git a/bluetooth/power_off_finder/OWNERS b/bluetooth/power_off_finder/OWNERS deleted file mode 100644 index 51a96c1..0000000 --- a/bluetooth/power_off_finder/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# Bug component: 27441 -quocbaodo@google.com diff --git a/bluetooth/power_off_finder/aidl/Android.bp b/bluetooth/power_off_finder/aidl/Android.bp deleted file mode 100644 index ad40a9c..0000000 --- a/bluetooth/power_off_finder/aidl/Android.bp +++ /dev/null @@ -1,28 +0,0 @@ -package { - // See: http://go/android-license-faq - default_applicable_licenses: ["Android-Apache-2.0"], -} - -aidl_interface { - name: "hardware.google.bluetooth.power_off_finder", - owner: "google", - vendor_available: true, - srcs: ["hardware/google/bluetooth/power_off_finder/*.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/power_off_finder/aidl/aidl_api/hardware.google.bluetooth.power_off_finder/current/hardware/google/bluetooth/power_off_finder/IBluetoothFinder.aidl b/bluetooth/power_off_finder/aidl/aidl_api/hardware.google.bluetooth.power_off_finder/current/hardware/google/bluetooth/power_off_finder/IBluetoothFinder.aidl deleted file mode 100644 index 89678c8..0000000 --- a/bluetooth/power_off_finder/aidl/aidl_api/hardware.google.bluetooth.power_off_finder/current/hardware/google/bluetooth/power_off_finder/IBluetoothFinder.aidl +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 <name>-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.power_off_finder; -@VintfStability -interface IBluetoothFinder { - void sendPrecomputedKeys(in byte[] keys); - void setPoweredOffMode(in boolean enable); -} diff --git a/bluetooth/power_off_finder/aidl/hardware/google/bluetooth/power_off_finder/IBluetoothFinder.aidl b/bluetooth/power_off_finder/aidl/hardware/google/bluetooth/power_off_finder/IBluetoothFinder.aidl deleted file mode 100644 index 752c84f..0000000 --- a/bluetooth/power_off_finder/aidl/hardware/google/bluetooth/power_off_finder/IBluetoothFinder.aidl +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - */ - -package hardware.google.bluetooth.power_off_finder; - -@VintfStability -interface IBluetoothFinder { - /** - * API to set the precomputed keys to the Bluetooth Controller - * - * @param keys Precomputed keys to the Bluetooth Controller - */ - void sendPrecomputedKeys(in byte[] keys); - - /** - * API to enable powered off feature - * - * @param enable true to enable; false to disable - */ - void setPoweredOffMode(in boolean enable); -} diff --git a/bluetooth/power_off_finder/aidl/vts/Android.bp b/bluetooth/power_off_finder/aidl/vts/Android.bp deleted file mode 100644 index cf709de..0000000 --- a/bluetooth/power_off_finder/aidl/vts/Android.bp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 deleted file mode 100644 index dbd5fd9..0000000 --- a/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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 <aidl/Gtest.h> -#include <aidl/Vintf.h> -#include <aidl/hardware/google/bluetooth/power_off_finder/IBluetoothFinder.h> -#include <android-base/logging.h> -#include <android/binder_manager.h> -#include <android/binder_process.h> -#include <binder/IServiceManager.h> -#include <utils/Log.h> - -#include <vector> - -using ::aidl::hardware::google::bluetooth::power_off_finder::IBluetoothFinder; -using ::ndk::ScopedAStatus; - -class BluetoothPofTest : public ::testing::TestWithParam<std::string> { -public: - virtual void SetUp() override; - virtual void TearDown() override; - - // test functions to call - ScopedAStatus sendAndCheckPrecomputedKeys(uint_t numKeys); - - std::shared_ptr<IBluetoothFinder> 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<uint8_t> 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); -} - -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, SetPowerOffMode) { - ScopedAStatus status = bluetooth_pof->setPoweredOffMode(true); - 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 deleted file mode 100644 index 006a99c..0000000 --- a/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- 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. ---> -<configuration description="Runs VtsHalBluetoothPofTargetTest."> - <option name="test-suite-tag" value="apct" /> - <option name="test-suite-tag" value="apct-native" /> - - <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"> - </target_preparer> - - <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> - <option name="cleanup" value="true" /> - <option name="push" value="VtsHalBluetoothPofTargetTest->/data/local/tmp/VtsHalBluetoothPofTargetTest" /> - </target_preparer> - - <test class="com.android.tradefed.testtype.GTest" > - <option name="native-test-device-path" value="/data/local/tmp" /> - <option name="module-name" value="VtsHalBluetoothPofTargetTest" /> - </test> -</configuration> |