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

Commit e5f0a02f authored by Myles Watson's avatar Myles Watson Committed by Automerger Merge Worker
Browse files

Cuttlefish: Log an error and close on !isOk() am: 727ca0e7

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

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


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


@@ -132,8 +138,11 @@ Return<void> BluetoothHci::initialize_impl(
        hidl_vec<uint8_t> sco_packet(packet->begin(), packet->end());
        hidl_vec<uint8_t> sco_packet(packet->begin(), packet->end());
        auto ret = cb->aclDataReceived(sco_packet);
        auto ret = cb->aclDataReceived(sco_packet);
        if (!ret.isOk()) {
        if (!ret.isOk()) {
          CHECK(death_recipient_->getHasDied())
          LOG_ERROR("Error sending sco callback");
              << "Error sending sco callback, but no death notification.";
          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());
          hidl_vec<uint8_t> iso_packet(packet->begin(), packet->end());
          auto ret = cb_1_1->isoDataReceived(iso_packet);
          auto ret = cb_1_1->isoDataReceived(iso_packet);
          if (!ret.isOk()) {
          if (!ret.isOk()) {
            CHECK(death_recipient_->getHasDied())
            LOG_ERROR("Error sending iso callback");
                << "Error sending iso callback, but no death notification.";
            if (!death_recipient_->getHasDied()) {
              LOG_ERROR("Closing");
              close();
            }
          }
          }
        });
        });
  }
  }