diff options
author | Ted Wang <tedwang@google.com> | 2023-03-21 05:02:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-03-21 05:02:06 +0000 |
commit | e6a0315d5c99b16778e8c2126392415a0311b434 (patch) | |
tree | 1658605e2933c66fbc6ad8b6b679ad83428b1487 | |
parent | d789ed6ad067a531bd6807cd99695dde9d62ed26 (diff) | |
parent | 84750c40c24434c21812595b9d6ccc5cd17114ef (diff) | |
download | interfaces-e6a0315d5c99b16778e8c2126392415a0311b434.tar.gz |
Merge "Add setPoweredOffMode and remote startPoweredOffMode API" into udc-dev
3 files changed, 6 insertions, 13 deletions
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 index d67e089..89678c8 100644 --- 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 @@ -35,5 +35,5 @@ package hardware.google.bluetooth.power_off_finder; @VintfStability interface IBluetoothFinder { void sendPrecomputedKeys(in byte[] keys); - void startPoweredOffMode(in int startKeyIndex); + 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 index acd0e2d..752c84f 100644 --- 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 @@ -26,10 +26,9 @@ interface IBluetoothFinder { void sendPrecomputedKeys(in byte[] keys); /** - * API to start powered off mode with the key index to the Bluetooth - * Controller + * API to enable powered off feature * - * @param startKeyIndex Index which indicates the first key + * @param enable true to enable; false to disable */ - void startPoweredOffMode(in int startKeyIndex); + void setPoweredOffMode(in boolean enable); } diff --git a/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp b/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp index 6ed84a8..dbd5fd9 100644 --- a/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp +++ b/bluetooth/power_off_finder/aidl/vts/VtsHalBluetoothPofTargetTest.cpp @@ -35,9 +35,7 @@ public: // test functions to call ScopedAStatus sendAndCheckPrecomputedKeys(uint_t numKeys); - ScopedAStatus checkStartPowerOffMode(uint8_t startIndex); -private: std::shared_ptr<IBluetoothFinder> bluetooth_pof; }; @@ -63,10 +61,6 @@ ScopedAStatus BluetoothPofTest::sendAndCheckPrecomputedKeys(uint_t numKeys) { 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()); @@ -77,8 +71,8 @@ TEST_P(BluetoothPofTest, SendAndCheckPrecomputedKeyManyKeys) { ASSERT_TRUE(status.isOk()); } -TEST_P(BluetoothPofTest, StartPowerOffMode) { - ScopedAStatus status = checkStartPowerOffMode(0); +TEST_P(BluetoothPofTest, SetPowerOffMode) { + ScopedAStatus status = bluetooth_pof->setPoweredOffMode(true); ASSERT_TRUE(status.isOk()); } |