Loading flags/rnr.aconfig +0 −7 Original line number Diff line number Diff line package: "com.android.bluetooth.flags" container: "com.android.btservices" flag { name: "rnr_cancel_before_event_race" namespace: "bluetooth" description: "Address race condition when rnr cancel and event arrive close together" bug: "316037290" } flag { name: "rnr_present_during_service_discovery" namespace: "bluetooth" Loading system/gd/hci/remote_name_request.cc +5 −13 Original line number Diff line number Diff line Loading @@ -154,7 +154,6 @@ struct RemoteNameRequestModule::impl { } void actually_cancel_remote_name_request(Address address) { if (com::android::bluetooth::flags::rnr_cancel_before_event_race()) { if (pending_) { log::info("Cancelling remote name request to {}", address.ToRedactedStringForLogging()); hci_layer_->EnqueueCommand( Loading @@ -165,13 +164,6 @@ struct RemoteNameRequestModule::impl { "Ignoring cancel RNR as RNR event already received to {}", address.ToRedactedStringForLogging()); } } else { log::assert_that(pending_ == true, "assert failed: pending_ == true"); log::info("Cancelling remote name request to {}", address.ToRedactedStringForLogging()); hci_layer_->EnqueueCommand( RemoteNameRequestCancelBuilder::Create(address), handler_->BindOnceOn(this, &impl::check_cancel_status, address)); } } void on_remote_host_supported_features_notification(EventView view) { Loading system/gd/hci/remote_name_request_test.cc +1 −6 Original line number Diff line number Diff line Loading @@ -659,12 +659,7 @@ TEST_F(RemoteNameRequestModuleTest, FailToSendCommandThenDequeueNext) { EXPECT_EQ(rnr_command.GetBdAddr(), address2); } #define MY_PACKAGE com::android::bluetooth::flags TEST_F_WITH_FLAGS( RemoteNameRequestModuleTest, CancelJustWhenRNREventReturns, REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(MY_PACKAGE, rnr_cancel_before_event_race))) { TEST_F(RemoteNameRequestModuleTest, CancelJustWhenRNREventReturns) { auto promise = std::promise<std::tuple<ErrorCode, std::array<uint8_t, 248>>>{}; auto future = promise.get_future(); Loading Loading
flags/rnr.aconfig +0 −7 Original line number Diff line number Diff line package: "com.android.bluetooth.flags" container: "com.android.btservices" flag { name: "rnr_cancel_before_event_race" namespace: "bluetooth" description: "Address race condition when rnr cancel and event arrive close together" bug: "316037290" } flag { name: "rnr_present_during_service_discovery" namespace: "bluetooth" Loading
system/gd/hci/remote_name_request.cc +5 −13 Original line number Diff line number Diff line Loading @@ -154,7 +154,6 @@ struct RemoteNameRequestModule::impl { } void actually_cancel_remote_name_request(Address address) { if (com::android::bluetooth::flags::rnr_cancel_before_event_race()) { if (pending_) { log::info("Cancelling remote name request to {}", address.ToRedactedStringForLogging()); hci_layer_->EnqueueCommand( Loading @@ -165,13 +164,6 @@ struct RemoteNameRequestModule::impl { "Ignoring cancel RNR as RNR event already received to {}", address.ToRedactedStringForLogging()); } } else { log::assert_that(pending_ == true, "assert failed: pending_ == true"); log::info("Cancelling remote name request to {}", address.ToRedactedStringForLogging()); hci_layer_->EnqueueCommand( RemoteNameRequestCancelBuilder::Create(address), handler_->BindOnceOn(this, &impl::check_cancel_status, address)); } } void on_remote_host_supported_features_notification(EventView view) { Loading
system/gd/hci/remote_name_request_test.cc +1 −6 Original line number Diff line number Diff line Loading @@ -659,12 +659,7 @@ TEST_F(RemoteNameRequestModuleTest, FailToSendCommandThenDequeueNext) { EXPECT_EQ(rnr_command.GetBdAddr(), address2); } #define MY_PACKAGE com::android::bluetooth::flags TEST_F_WITH_FLAGS( RemoteNameRequestModuleTest, CancelJustWhenRNREventReturns, REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(MY_PACKAGE, rnr_cancel_before_event_race))) { TEST_F(RemoteNameRequestModuleTest, CancelJustWhenRNREventReturns) { auto promise = std::promise<std::tuple<ErrorCode, std::array<uint8_t, 248>>>{}; auto future = promise.get_future(); Loading