diff --git a/system/gd/hci/le_scanning_manager.cc b/system/gd/hci/le_scanning_manager.cc index 4ade641f93..bb4840a97a 100644 --- a/system/gd/hci/le_scanning_manager.cc +++ b/system/gd/hci/le_scanning_manager.cc @@ -60,6 +60,8 @@ constexpr uint8_t kDataStatusBits = 5; // system properties const std::string kLeRxPathLossCompProperty = "bluetooth.hardware.radio.le_rx_path_loss_comp_db"; +const std::string kPropertyDisableApcfExtendedFeatures = "persist.sys.bt.le.disable_apcf_extended_features"; +bool kDisableApcfExtendedFeatures = false; const ModuleFactory LeScanningManager::Factory = ModuleFactory([]() { return new LeScanningManager(); }); @@ -190,7 +192,9 @@ struct LeScanningManager::impl : public LeAddressManagerCallback { api_type_ = ScanApiType::LEGACY; } is_filter_supported_ = controller_->IsSupported(OpCode::LE_ADV_FILTER); - if (is_filter_supported_) { + if (os::GetSystemProperty(kPropertyDisableApcfExtendedFeatures) == "1") + kDisableApcfExtendedFeatures = true; + if (is_filter_supported_ && !kDisableApcfExtendedFeatures) { le_scanning_interface_->EnqueueCommand( LeAdvFilterReadExtendedFeaturesBuilder::Create(), module_handler_->BindOnceOn(this, &impl::on_apcf_read_extended_features_complete));