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

Commit 0d1fcb32 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "RootCanal: Check if Authentication is in progress before starting one"...

Merge "RootCanal: Check if Authentication is in progress before starting one" am: 683cf589 am: a463bb99 am: c41710e9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1772606

Change-Id: I72386d9c8339299fc3a8c991023004ac74d14ee2
parents 3cb6ba4f c41710e9
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -794,8 +794,10 @@ void LinkLayerController::IncomingIoCapabilityRequestPacket(
            incoming.GetDestinationAddress(), incoming.GetSourceAddress(),
            static_cast<uint8_t>(
                ErrorCode::UNSUPPORTED_REMOTE_OR_LMP_FEATURE)));
    security_manager_.AuthenticationRequest(incoming.GetSourceAddress(), handle,
                                            false);
    if (!security_manager_.AuthenticationInProgress()) {
      security_manager_.AuthenticationRequest(incoming.GetSourceAddress(),
                                              handle, false);
    }
    security_manager_.SetPinRequested(peer);
    if (properties_.IsUnmasked(EventCode::PIN_CODE_REQUEST)) {
      send_event_(bluetooth::hci::PinCodeRequestBuilder::Create(
@@ -1894,7 +1896,9 @@ ErrorCode LinkLayerController::LinkKeyRequestNegativeReply(
  }

  if (properties_.GetSecureSimplePairingSupported()) {
    if (!security_manager_.AuthenticationInProgress()) {
      security_manager_.AuthenticationRequest(address, handle, false);
    }

    ScheduleTask(milliseconds(5),
                 [this, address]() { StartSimplePairing(address); });