From bc7e5876ad960a0fbe7fb255239559eb27fe7d22 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Fri, 17 Feb 2017 09:14:21 -0800 Subject: [PATCH] Bluetooth: Check the return value of initialize() Test: Test fails gracefully when initialize() fails Change-Id: Iff7737ba911635e9974612d8d192b783cf3e213d --- .../1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp index eb1cdc1d47..5a6c29ac80 100644 --- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp +++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp @@ -123,7 +123,7 @@ class BluetoothHidlTest : public ::testing::Test { // currently test passthrough mode only bluetooth = IBluetoothHci::getService(); ASSERT_NE(bluetooth, nullptr); - ALOGW("%s: getService() for bluetooth is %s", __func__, + ALOGI("%s: getService() for bluetooth is %s", __func__, bluetooth->isRemote() ? "remote" : "local"); bluetooth_cb = new BluetoothHciCallbacks(*this); @@ -255,7 +255,7 @@ class BluetoothHidlTest : public ::testing::Test { virtual ~BluetoothHciCallbacks() = default; Return initializationComplete(Status status) override { - parent_.initialized = true; + parent_.initialized = (status == Status::SUCCESS); parent_.notify_initialized(); ALOGV("%s (status = %d)", __func__, static_cast(status)); return Void();