OSDN Git Service

Additional trigger on IO Capability Response
authorMartin Brabham <optedoblivion@google.com>
Tue, 8 Sep 2020 04:03:29 +0000 (21:03 -0700)
committerMartin Brabham <optedoblivion@google.com>
Fri, 11 Sep 2020 06:40:31 +0000 (23:40 -0700)
In some cases IO Capability Response indicates
a pairing session.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Test: atest --host bluetooth_test_gd
Test: Manual testing with hybrid stack
Change-Id: Ib3a4bddafcb31f344fe4fbbb6441ce9c8e368344

gd/security/internal/security_manager_impl.cc

index 2041d49..a9e3ae4 100644 (file)
@@ -230,7 +230,7 @@ void SecurityManagerImpl::HandleEvent(T packet) {
     auto bd_addr = packet.GetBdAddr();
     auto event_code = packet.GetEventCode();
 
-    if (event_code != hci::EventCode::LINK_KEY_REQUEST) {
+    if (event_code != hci::EventCode::LINK_KEY_REQUEST || event_code != hci::EventCode::IO_CAPABILITY_RESPONSE) {
       LOG_ERROR("No classic pairing handler for device '%s' ready for command %s ", bd_addr.ToString().c_str(),
                 hci::EventCodeText(event_code).c_str());
       return;