diff options
author | Chris Phoenix <cphoenix@google.com> | 2017-01-21 02:51:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-01-21 02:51:31 +0000 |
commit | 272e495c4d2f36067e4ddafd8d2cbb9c4c86d5d8 (patch) | |
tree | 6b8f3f9e5c20b8cb4290ca15935be6281ea12f67 /vibrator | |
parent | b2a560a17e0be32b72b1cb5c0ce2b023993efaf2 (diff) | |
parent | 6823dd80e017a6638ebf5858ab542e0f25f19156 (diff) | |
download | android_hardware_interfaces-272e495c4d2f36067e4ddafd8d2cbb9c4c86d5d8.tar.gz android_hardware_interfaces-272e495c4d2f36067e4ddafd8d2cbb9c4c86d5d8.tar.bz2 android_hardware_interfaces-272e495c4d2f36067e4ddafd8d2cbb9c4c86d5d8.zip |
Merge "vibrator HAL uses "default" service name"
Diffstat (limited to 'vibrator')
3 files changed, 5 insertions, 8 deletions
diff --git a/vibrator/1.0/default/Vibrator.cpp b/vibrator/1.0/default/Vibrator.cpp index e86e68152..8c82bcd5d 100644 --- a/vibrator/1.0/default/Vibrator.cpp +++ b/vibrator/1.0/default/Vibrator.cpp @@ -50,18 +50,18 @@ Return<Status> Vibrator::off() { return Status::OK; } -IVibrator* HIDL_FETCH_IVibrator(const char *hal) { +IVibrator* HIDL_FETCH_IVibrator(const char * /*hal*/) { vibrator_device_t *vib_device; const hw_module_t *hw_module = nullptr; - int ret = hw_get_module(hal, &hw_module); + int ret = hw_get_module(VIBRATOR_HARDWARE_MODULE_ID, &hw_module); if (ret == 0) { ret = vibrator_open(hw_module, &vib_device); if (ret != 0) { - ALOGE("vibrator_open %s failed: %d", hal, ret); + ALOGE("vibrator_open failed: %d", ret); } } else { - ALOGE("hw_get_module %s failed: %d", hal, ret); + ALOGE("hw_get_module %s failed: %d", VIBRATOR_HARDWARE_MODULE_ID, ret); } if (ret == 0) { diff --git a/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp b/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp index ec8db3a9b..782a7636a 100644 --- a/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp +++ b/vibrator/1.0/vts/functional/vibrator_hidl_hal_test.cpp @@ -28,13 +28,11 @@ using ::android::hardware::Return; using ::android::hardware::Void; using ::android::sp; -#define VIBRATOR_SERVICE_NAME "vibrator" - // The main test class for VIBRATOR HIDL HAL. class VibratorHidlTest : public ::testing::Test { public: virtual void SetUp() override { - vibrator = IVibrator::getService(VIBRATOR_SERVICE_NAME, false); + vibrator = IVibrator::getService(false); ASSERT_NE(vibrator, nullptr); } diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py index 498ea060c..84f2907b1 100644 --- a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py +++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py @@ -45,7 +45,6 @@ class VibratorHidlTest(base_test_with_webdb.BaseTestWithWebDbClass): target_version=1.0, target_package="android.hardware.vibrator", target_component_name="IVibrator", - hw_binder_service_name="vibrator", bits=64 if self.dut.is64Bit else 32) def tearDownClass(self): |