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

Commit ca016322 authored by Jack He's avatar Jack He Committed by Gerrit Code Review
Browse files

Merge changes I8bf1ee69,I79f91c5e into main

* changes:
  Cert: Do not call OnRemoteNameResponse when receiving HCI status pending
  Cert: Do not register for remote host supported features in test
parents bafbbc84 a0c1e17c
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -183,10 +183,6 @@ class HciMatchers(object):
    def UserConfirmationRequest():
        return HciMatchers.EventWithCode(hci.EventCode.USER_CONFIRMATION_REQUEST)

    @staticmethod
    def RemoteHostSupportedFeaturesNotification():
        return HciMatchers.EventWithCode(hci.EventCode.REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION)

    @staticmethod
    def LinkKeyNotification():
        return HciMatchers.EventWithCode(hci.EventCode.LINK_KEY_NOTIFICATION)
+0 −1
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ class PyNeighbor(object):

    def __init__(self, device):
        self.device = device
        self.remote_host_supported_features_notification_registered = False

    def set_inquiry_mode(self, inquiry_msg):
        """
+10 −9
Original line number Diff line number Diff line
@@ -90,15 +90,16 @@ class CertSecurity(PySecurity):
        self._device = device
        self._device.wait_channel_ready()
        self._hci = PyHci(device)
        self._hci.register_for_events(
            hci.EventCode.ENCRYPTION_CHANGE, hci.EventCode.CHANGE_CONNECTION_LINK_KEY_COMPLETE,
            hci.EventCode.CENTRAL_LINK_KEY_COMPLETE, hci.EventCode.RETURN_LINK_KEYS, hci.EventCode.PIN_CODE_REQUEST,
            hci.EventCode.LINK_KEY_REQUEST, hci.EventCode.LINK_KEY_NOTIFICATION,
            hci.EventCode.ENCRYPTION_KEY_REFRESH_COMPLETE, hci.EventCode.IO_CAPABILITY_REQUEST,
            hci.EventCode.IO_CAPABILITY_RESPONSE, hci.EventCode.REMOTE_OOB_DATA_REQUEST,
            hci.EventCode.SIMPLE_PAIRING_COMPLETE, hci.EventCode.USER_PASSKEY_NOTIFICATION,
            hci.EventCode.KEYPRESS_NOTIFICATION, hci.EventCode.USER_CONFIRMATION_REQUEST,
            hci.EventCode.USER_PASSKEY_REQUEST, hci.EventCode.REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION)
        self._hci.register_for_events(hci.EventCode.ENCRYPTION_CHANGE,
                                      hci.EventCode.CHANGE_CONNECTION_LINK_KEY_COMPLETE,
                                      hci.EventCode.CENTRAL_LINK_KEY_COMPLETE, hci.EventCode.RETURN_LINK_KEYS,
                                      hci.EventCode.PIN_CODE_REQUEST, hci.EventCode.LINK_KEY_REQUEST,
                                      hci.EventCode.LINK_KEY_NOTIFICATION,
                                      hci.EventCode.ENCRYPTION_KEY_REFRESH_COMPLETE,
                                      hci.EventCode.IO_CAPABILITY_REQUEST, hci.EventCode.IO_CAPABILITY_RESPONSE,
                                      hci.EventCode.REMOTE_OOB_DATA_REQUEST, hci.EventCode.SIMPLE_PAIRING_COMPLETE,
                                      hci.EventCode.USER_PASSKEY_NOTIFICATION, hci.EventCode.KEYPRESS_NOTIFICATION,
                                      hci.EventCode.USER_CONFIRMATION_REQUEST, hci.EventCode.USER_PASSKEY_REQUEST)
        self._hci_event_stream = self._hci.get_event_stream()

    def create_bond(self, address, type):
+1 −6
Original line number Diff line number Diff line
@@ -87,12 +87,7 @@ void neighbor::NameDbModule::impl::ReadRemoteNameRequest(
      address,
      hci::RemoteNameRequestBuilder::Create(
          address, page_scan_repetition_mode, clock_offset, clock_offset_valid),
      handler_->BindOnce(
          [](neighbor::NameDbModule::impl* self, hci::Address address, hci::ErrorCode status) {
            self->OnRemoteNameResponse(address, status, {});
          },
          common::Unretained(this),
          address),
      handler_->BindOnce([](hci::ErrorCode /* status */) {}),
      handler_->BindOnce([&](uint64_t /* features */) {
        LOG_WARN("UNIMPLEMENTED: ignoring host supported features");
      }),