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

Commit 37f5d8ba authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I3120d8a3,I784dfcb7 am: affdbada am: 06a350df

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

Change-Id: I59d8d7990c3c39e269351aef6d387ca440526b36
parents 83d6b1ad 06a350df
Loading
Loading
Loading
Loading
+21 −9
Original line number Diff line number Diff line
@@ -112,8 +112,11 @@ Return<void> BluetoothHci::initialize_impl(
        hidl_vec<uint8_t> hci_event(packet->begin(), packet->end());
        auto ret = cb->hciEventReceived(hci_event);
        if (!ret.isOk()) {
          CHECK(death_recipient_->getHasDied())
              << "Error sending event callback, but no death notification.";
          LOG_ERROR("Error sending event callback");
          if (!death_recipient_->getHasDied()) {
            LOG_ERROR("Closing");
            close();
          }
        }
      });

@@ -122,18 +125,24 @@ Return<void> BluetoothHci::initialize_impl(
        hidl_vec<uint8_t> acl_packet(packet->begin(), packet->end());
        auto ret = cb->aclDataReceived(acl_packet);
        if (!ret.isOk()) {
          CHECK(death_recipient_->getHasDied())
              << "Error sending acl callback, but no death notification.";
          LOG_ERROR("Error sending acl callback");
          if (!death_recipient_->getHasDied()) {
            LOG_ERROR("Closing");
            close();
          }
        }
      });

  controller_->RegisterScoChannel(
      [this, cb](std::shared_ptr<std::vector<uint8_t>> packet) {
        hidl_vec<uint8_t> sco_packet(packet->begin(), packet->end());
        auto ret = cb->aclDataReceived(sco_packet);
        auto ret = cb->scoDataReceived(sco_packet);
        if (!ret.isOk()) {
          CHECK(death_recipient_->getHasDied())
              << "Error sending sco callback, but no death notification.";
          LOG_ERROR("Error sending sco callback");
          if (!death_recipient_->getHasDied()) {
            LOG_ERROR("Closing");
            close();
          }
        }
      });

@@ -143,8 +152,11 @@ Return<void> BluetoothHci::initialize_impl(
          hidl_vec<uint8_t> iso_packet(packet->begin(), packet->end());
          auto ret = cb_1_1->isoDataReceived(iso_packet);
          if (!ret.isOk()) {
            CHECK(death_recipient_->getHasDied())
                << "Error sending iso callback, but no death notification.";
            LOG_ERROR("Error sending iso callback");
            if (!death_recipient_->getHasDied()) {
              LOG_ERROR("Closing");
              close();
            }
          }
        });
  }