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

Commit e7e9e4f8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topic "gd_passkey"

* changes:
  PySecurity: Clarify function name
  Security Passkey: Send passkey from API to controller
parents d8d0af3b 543b5b79
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ class PySecurity(Closable):
        """
        passkey = -1

        def get_unique_id(event):
        def get_passkey(event):
            if event.message_type == UiMsgType.DISPLAY_PASSKEY:
                nonlocal passkey
                passkey = event.numeric_value
@@ -181,7 +181,7 @@ class PySecurity(Closable):
            return False

        logging.debug("DUT: Waiting for expected UI event")
        assertThat(self._ui_event_stream).emits(get_unique_id)
        assertThat(self._ui_event_stream).emits(get_passkey)
        return passkey

    def input_pin(self, cert_address, pin):
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ void ClassicPairingHandler::OnConfirmYesNo(const bluetooth::hci::AddressWithType
}

void ClassicPairingHandler::OnPasskeyEntry(const bluetooth::hci::AddressWithType& address, uint32_t passkey) {
  LOG_WARN("TODO Not Implemented!");
  GetChannel()->SendCommand(hci::UserPasskeyRequestReplyBuilder::Create(address.GetAddress(), passkey));
}

void ClassicPairingHandler::OnPinEntry(const bluetooth::hci::AddressWithType& address, std::vector<uint8_t> pin) {