Merge "Vr HAL uses "default" service name"
diff --git a/vr/1.0/default/Vr.cpp b/vr/1.0/default/Vr.cpp
index a0de998..345db99 100644
--- a/vr/1.0/default/Vr.cpp
+++ b/vr/1.0/default/Vr.cpp
@@ -42,16 +42,16 @@
return Void();
}
-IVr* HIDL_FETCH_IVr(const char *name) {
+IVr* HIDL_FETCH_IVr(const char * /*name*/) {
vr_module_t *vr_module;
const hw_module_t *hw_module = NULL;
- int ret = hw_get_module(name, &hw_module);
+ int ret = hw_get_module(VR_HARDWARE_MODULE_ID, &hw_module);
if (ret == 0) {
return new Vr(reinterpret_cast<vr_module_t*>(
const_cast<hw_module_t*>(hw_module)));
} else {
- ALOGE("hw_get_module %s failed: %d", name, ret);
+ ALOGE("hw_get_module %s failed: %d", VR_HARDWARE_MODULE_ID, ret);
return nullptr;
}
}
diff --git a/vr/1.0/default/service.cpp b/vr/1.0/default/service.cpp
index c27ceaf..22fb7d1 100644
--- a/vr/1.0/default/service.cpp
+++ b/vr/1.0/default/service.cpp
@@ -23,5 +23,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IVr>("vr");
+ return defaultPassthroughServiceImplementation<IVr>();
}
diff --git a/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp b/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
index 29888fd..c7ec076 100644
--- a/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
+++ b/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
@@ -26,13 +26,11 @@
using ::android::hardware::Void;
using ::android::sp;
-#define VR_SERVICE_NAME "vr"
-
// The main test class for VR HIDL HAL.
class VrHidlTest : public ::testing::Test {
public:
void SetUp() override {
- vr = IVr::getService(VR_SERVICE_NAME);
+ vr = IVr::getService();
ASSERT_NE(vr, nullptr);
}