From b5558e3de1c86247dff0e8f62d10bacfe3a087bb Mon Sep 17 00:00:00 2001 From: Chris Phoenix Date: Tue, 17 Jan 2017 22:47:52 -0800 Subject: [PATCH] Bluetooth HAL uses "default" service name The getService() and registerAsService() methods of interface objects now have default parameters of "default" for the service name. HALs will not have to use any service name unless they want to register more than one service. Test: builds; verify HAL still works In support of b/33844934 Change-Id: Icc006a71b41bcd03fe4a04ee92503e76ff07cd77 --- bluetooth/1.0/default/service.cpp | 2 +- bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bluetooth/1.0/default/service.cpp b/bluetooth/1.0/default/service.cpp index a3c3cad14a..fa5106f58a 100644 --- a/bluetooth/1.0/default/service.cpp +++ b/bluetooth/1.0/default/service.cpp @@ -25,5 +25,5 @@ using android::hardware::bluetooth::V1_0::IBluetoothHci; using android::hardware::defaultPassthroughServiceImplementation; int main() { - return defaultPassthroughServiceImplementation("bluetooth"); + return defaultPassthroughServiceImplementation(); } diff --git a/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp b/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp index 2ba5bb455c..683029e038 100644 --- a/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp +++ b/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp @@ -36,8 +36,6 @@ using ::android::hardware::Return; using ::android::hardware::Void; using ::android::sp; -#define Bluetooth_HCI_SERVICE_NAME "bluetooth" - #define HCI_MINIMUM_HCI_VERSION 5 // Bluetooth Core Specification 3.0 + HS #define HCI_MINIMUM_LMP_VERSION 5 // Bluetooth Core Specification 3.0 + HS #define NUM_HCI_COMMANDS_BANDWIDTH 1000 @@ -123,8 +121,8 @@ class BluetoothHidlTest : public ::testing::Test { public: virtual void SetUp() override { // currently test passthrough mode only - bluetooth = IBluetoothHci::getService(Bluetooth_HCI_SERVICE_NAME); - ALOGW("%s: getService(%s) is %s", __func__, Bluetooth_HCI_SERVICE_NAME, + bluetooth = IBluetoothHci::getService(); + ALOGW("%s: getService() for bluetooth is %s", __func__, bluetooth->isRemote() ? "remote" : "local"); ASSERT_NE(bluetooth, nullptr);