Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14b3e644 authored by Steven Liu's avatar Steven Liu
Browse files

Update default service for channel sounding HAL v2

Bug: 357090692
Test: build
Change-Id: I78eec190a4b216799462578cf6309b6fef5b0a9b
parent ccd12745
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -14,7 +14,7 @@ cc_binary {
        "service.cpp",
        "service.cpp",
    ],
    ],
    shared_libs: [
    shared_libs: [
        "android.hardware.bluetooth.ranging-V1-ndk",
        "android.hardware.bluetooth.ranging-V2-ndk",
        "libbase",
        "libbase",
        "libbinder_ndk",
        "libbinder_ndk",
        "libhidlbase",
        "libhidlbase",
+7 −0
Original line number Original line Diff line number Diff line
@@ -55,4 +55,11 @@ ndk::ScopedAStatus BluetoothChannelSounding::openSession(
  *_aidl_return = session;
  *_aidl_return = session;
  return ::ndk::ScopedAStatus::ok();
  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
}  // namespace aidl::android::hardware::bluetooth::ranging::impl
+2 −0
Original line number Original line Diff line number Diff line
@@ -47,6 +47,8 @@ class BluetoothChannelSounding : public BnBluetoothChannelSounding {
      const std::shared_ptr<IBluetoothChannelSoundingSessionCallback>&
      const std::shared_ptr<IBluetoothChannelSoundingSessionCallback>&
          in_callback,
          in_callback,
      std::shared_ptr<IBluetoothChannelSoundingSession>* _aidl_return) override;
      std::shared_ptr<IBluetoothChannelSoundingSession>* _aidl_return) override;
  ndk::ScopedAStatus getSupportedCsSecurityLevels(
      std::vector<CsSecurityLevel>* _aidl_return) override;
};
};


}  // namespace aidl::android::hardware::bluetooth::ranging::impl
}  // namespace aidl::android::hardware::bluetooth::ranging::impl
+16 −0
Original line number Original line Diff line number Diff line
@@ -52,4 +52,20 @@ ndk::ScopedAStatus BluetoothChannelSoundingSession::close(Reason in_reason) {
  callback_->onClose(in_reason);
  callback_->onClose(in_reason);
  return ::ndk::ScopedAStatus::ok();
  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
}  // namespace aidl::android::hardware::bluetooth::ranging::impl
+11 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,10 @@
namespace aidl::android::hardware::bluetooth::ranging::impl {
namespace aidl::android::hardware::bluetooth::ranging::impl {


using ::aidl::android::hardware::bluetooth::ranging::ChannelSoudingRawData;
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::Reason;
using ::aidl::android::hardware::bluetooth::ranging::ResultType;
using ::aidl::android::hardware::bluetooth::ranging::ResultType;
using ::aidl::android::hardware::bluetooth::ranging::VendorSpecificData;
using ::aidl::android::hardware::bluetooth::ranging::VendorSpecificData;
@@ -42,6 +46,13 @@ class BluetoothChannelSoundingSession
  ndk::ScopedAStatus writeRawData(
  ndk::ScopedAStatus writeRawData(
      const ChannelSoudingRawData& in_rawData) override;
      const ChannelSoudingRawData& in_rawData) override;
  ndk::ScopedAStatus close(Reason in_reason) 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:
 private:
  std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback_;
  std::shared_ptr<IBluetoothChannelSoundingSessionCallback> callback_;
Loading