diff --git a/flags/ranging.aconfig b/flags/ranging.aconfig index 1be1b6edf74a32d93bb8489793acba24275ad016..16c7701ad79e6db021ecd7749dfc32225e36469d 100644 --- a/flags/ranging.aconfig +++ b/flags/ranging.aconfig @@ -6,3 +6,10 @@ flag { description: "Enable Channel Sounding" bug: "317683528" } + +flag { + name: "channel_sounding_in_stack" + namespace: "bluetooth" + description: "Enable Channel Sounding in the Bluetooth stack" + bug: "324185011" +} \ No newline at end of file diff --git a/system/gd/hci/distance_measurement_manager.cc b/system/gd/hci/distance_measurement_manager.cc index f8a26c575ab76d1b0d5ce8847053cb8d324d2a7a..dac1d9a93700c692eaa6a63d82ca25cadd6632a2 100644 --- a/system/gd/hci/distance_measurement_manager.cc +++ b/system/gd/hci/distance_measurement_manager.cc @@ -110,8 +110,8 @@ struct DistanceMeasurementManager::impl { hci_layer_->RegisterLeEventHandler( hci::SubeventCode::TRANSMIT_POWER_REPORTING, handler_->BindOn(this, &impl::on_transmit_power_reporting)); - if (!IS_FLAG_ENABLED(channel_sounding)) { - LOG_INFO("IS_FLAG_ENABLED channel_sounding: false"); + if (!IS_FLAG_ENABLED(channel_sounding_in_stack)) { + LOG_INFO("IS_FLAG_ENABLED channel_sounding_in_stack: false"); return; } distance_measurement_interface_ = hci_layer_->GetDistanceMeasurementInterface( @@ -172,7 +172,7 @@ struct DistanceMeasurementManager::impl { "connection_handle: %d, address: %s", connection_handle, ADDRESS_TO_LOGGABLE_CSTR(cs_remote_address)); - if (!IS_FLAG_ENABLED(channel_sounding)) { + if (!IS_FLAG_ENABLED(channel_sounding_in_stack)) { LOG_ERROR("Channel Sounding is not enabled"); distance_measurement_callbacks_->OnDistanceMeasurementStartFail( cs_remote_address, REASON_INTERNAL_ERROR, METHOD_CS);