Merge "Bluetooth: Add CHECK and move ASSERT" am: b835ea3f11

am: 028ce01354

Change-Id: Ia432ecc1676f926a157eb6b978990c19814f2aa4
This commit is contained in:
Myles Watson
2017-02-14 02:18:43 +00:00
committed by android-build-merger
2 changed files with 2 additions and 1 deletions

View File

@@ -414,6 +414,7 @@ void VendorInterface::OnDataReady(int fd) {
hci_packet_.data() + preamble_size_for_type[hci_packet_type_] +
hci_packet_bytes_read_,
hci_packet_bytes_remaining_));
CHECK(bytes_read > 0);
hci_packet_bytes_remaining_ -= bytes_read;
hci_packet_bytes_read_ += bytes_read;
if (hci_packet_bytes_remaining_ == 0) {

View File

@@ -122,9 +122,9 @@ class BluetoothHidlTest : public ::testing::Test {
virtual void SetUp() override {
// currently test passthrough mode only
bluetooth = IBluetoothHci::getService();
ASSERT_NE(bluetooth, nullptr);
ALOGW("%s: getService() for bluetooth is %s", __func__,
bluetooth->isRemote() ? "remote" : "local");
ASSERT_NE(bluetooth, nullptr);
bluetooth_cb = new BluetoothHciCallbacks(*this);
ASSERT_NE(bluetooth_cb, nullptr);