Update default service for channel sounding HAL v2
Bug: 357090692
Test: build
Change-Id: I78eec190a4b216799462578cf6309b6fef5b0a9b
diff --git a/bluetooth/ranging/aidl/default/Android.bp b/bluetooth/ranging/aidl/default/Android.bp
index 5072a43..0912a4f 100644
--- a/bluetooth/ranging/aidl/default/Android.bp
+++ b/bluetooth/ranging/aidl/default/Android.bp
@@ -14,7 +14,7 @@
"service.cpp",
],
shared_libs: [
- "android.hardware.bluetooth.ranging-V1-ndk",
+ "android.hardware.bluetooth.ranging-V2-ndk",
"libbase",
"libbinder_ndk",
"libhidlbase",
diff --git a/bluetooth/ranging/aidl/default/BluetoothChannelSounding.cpp b/bluetooth/ranging/aidl/default/BluetoothChannelSounding.cpp
index 3807d4f..e2a8693 100644
--- a/bluetooth/ranging/aidl/default/BluetoothChannelSounding.cpp
+++ b/bluetooth/ranging/aidl/default/BluetoothChannelSounding.cpp
@@ -55,4 +55,11 @@
*_aidl_return = session;
return ::ndk::ScopedAStatus::ok();
}
+
+ndk::ScopedAStatus BluetoothChannelSounding::getSupportedCsSecurityLevels(
+ std::vector<CsSecurityLevel>* _aidl_return) {
+ std::vector<CsSecurityLevel> supported_security_levels = {};
+ *_aidl_return = supported_security_levels;
+ return ::ndk::ScopedAStatus::ok();
+}
} // namespace aidl::android::hardware::bluetooth::ranging::impl
diff --git a/bluetooth/ranging/aidl/default/BluetoothChannelSounding.h b/bluetooth/ranging/aidl/default/BluetoothChannelSounding.h
index d6b5c03..43232fa 100644
--- a/bluetooth/ranging/aidl/default/BluetoothChannelSounding.h
+++ b/bluetooth/ranging/aidl/default/BluetoothChannelSounding.h
@@ -47,6 +47,8 @@
const std::shared_ptr<IBluetoothChannelSoundingSessionCallback>&
in_callback,
std::shared_ptr<IBluetoothChannelSoundingSession>* _aidl_return) override;
+ ndk::ScopedAStatus getSupportedCsSecurityLevels(
+ std::vector<CsSecurityLevel>* _aidl_return) override;
};
} // namespace aidl::android::hardware::bluetooth::ranging::impl
diff --git a/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.cpp b/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.cpp
index 6c58a07..bfdd5b6 100644
--- a/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.cpp
+++ b/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.cpp
@@ -52,4 +52,20 @@
callback_->onClose(in_reason);
return ::ndk::ScopedAStatus::ok();
}
+ndk::ScopedAStatus BluetoothChannelSoundingSession::writeProcedureData(
+ const ChannelSoundingProcedureData& /*in_procedureData*/) {
+ return ::ndk::ScopedAStatus::ok();
+}
+ndk::ScopedAStatus BluetoothChannelSoundingSession::updateChannelSoundingConfig(
+ const Config& /*in_config*/) {
+ return ::ndk::ScopedAStatus::ok();
+}
+ndk::ScopedAStatus BluetoothChannelSoundingSession::updateProcedureEnableConfig(
+ const ProcedureEnableConfig& /*in_procedureEnableConfig*/) {
+ return ::ndk::ScopedAStatus::ok();
+}
+ndk::ScopedAStatus BluetoothChannelSoundingSession::updateBleConnInterval(
+ int /*in_bleConnInterval*/) {
+ return ::ndk::ScopedAStatus::ok();
+}
} // namespace aidl::android::hardware::bluetooth::ranging::impl
diff --git a/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.h b/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.h
index 6703f7f..ae66c7c 100644
--- a/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.h
+++ b/bluetooth/ranging/aidl/default/BluetoothChannelSoundingSession.h
@@ -22,6 +22,10 @@
namespace aidl::android::hardware::bluetooth::ranging::impl {
using ::aidl::android::hardware::bluetooth::ranging::ChannelSoudingRawData;
+using ::aidl::android::hardware::bluetooth::ranging::
+ ChannelSoundingProcedureData;
+using ::aidl::android::hardware::bluetooth::ranging::Config;
+using ::aidl::android::hardware::bluetooth::ranging::ProcedureEnableConfig;
using ::aidl::android::hardware::bluetooth::ranging::Reason;
using ::aidl::android::hardware::bluetooth::ranging::ResultType;
using ::aidl::android::hardware::bluetooth::ranging::VendorSpecificData;
@@ -42,6 +46,13 @@
ndk::ScopedAStatus writeRawData(
const ChannelSoudingRawData& in_rawData) override;
ndk::ScopedAStatus close(Reason in_reason) override;
+ ndk::ScopedAStatus writeProcedureData(
+ const ChannelSoundingProcedureData& in_procedureData) override;
+ ndk::ScopedAStatus updateChannelSoundingConfig(
+ const Config& in_config) override;
+ ndk::ScopedAStatus updateProcedureEnableConfig(
+ const ProcedureEnableConfig& in_procedureEnableConfig) override;
+ ndk::ScopedAStatus updateBleConnInterval(int in_bleConnInterval) override;
private:
std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback_;
diff --git a/bluetooth/ranging/aidl/default/bluetooth-ranging-service-default.xml b/bluetooth/ranging/aidl/default/bluetooth-ranging-service-default.xml
index fe3613d..87adf2c 100644
--- a/bluetooth/ranging/aidl/default/bluetooth-ranging-service-default.xml
+++ b/bluetooth/ranging/aidl/default/bluetooth-ranging-service-default.xml
@@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.bluetooth.ranging</name>
- <version>1</version>
+ <version>2</version>
<fqname>IBluetoothChannelSounding/default</fqname>
</hal>
</manifest>