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

Commit 372f6e80 authored by Jack He's avatar Jack He
Browse files

Cert: Do not register for remote host supported features in test

* The event is registered by the RemoteNameRequest module and should
  only be handled there instead

Bug: 307877650
Test: Test: m bluetooth_stack_with_facade && gd/cert/run --clean SecurityTest
Change-Id: I79f91c5e2dbb7879afd0207a88d120e821b1b44c
parent 7c81f3d7
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):