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

Commit 658eae8f authored by Chris Manton's avatar Chris Manton
Browse files

gd::l2cap: Replace InvokeIfNotEmpty with Invoke

Bug: 331467255
Test: m .
Flag: EXEMPT, Mechanical Refactor
Change-Id: I5c992cf3a766a79bb079c4753d43da167503dc63
parent 8c1a26ea
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -51,9 +51,9 @@ class SecurityEnforcementRejectAllImpl : public SecurityEnforcementInterface {
      SecurityPolicy policy,
      ResultCallback result_callback) override {
    if (policy == SecurityPolicy::_SDP_ONLY_NO_SECURITY_WHATSOEVER_PLAINTEXT_TRANSPORT_OK) {
      result_callback.InvokeIfNotEmpty(true);
      result_callback.Invoke(true);
    } else {
      result_callback.InvokeIfNotEmpty(false);
      result_callback.Invoke(false);
    }
  }
};
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ void DynamicChannelImpl::OnClosed(hci::ErrorCode status) {
  close_reason_ = status;
  link_ = nullptr;
  l2cap_handler_ = nullptr;
  on_close_callback_.InvokeIfNotEmpty(close_reason_);
  on_close_callback_.Invoke(close_reason_);
  on_close_callback_ = {};
}

+2 −2
Original line number Diff line number Diff line
@@ -44,9 +44,9 @@ class SecurityEnforcementRejectAllImpl : public SecurityEnforcementInterface {
      SecurityPolicy policy,
      ResultCallback result_callback) override {
    if (policy == SecurityPolicy::NO_SECURITY_WHATSOEVER_PLAINTEXT_TRANSPORT_OK) {
      result_callback.InvokeIfNotEmpty(true);
      result_callback.Invoke(true);
    } else {
      result_callback.InvokeIfNotEmpty(false);
      result_callback.Invoke(false);
    }
  }
};