summaryrefslogtreecommitdiffstats
path: root/vr
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2017-02-27 18:46:22 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-02-27 18:46:22 +0000
commit2d4681b397c3d15e66bed2734ec4c17817e699de (patch)
treedd245a03e6165bef2188e5c9957e0b6295732885 /vr
parent1daad90b817880280ac55d4722a1eb4e0fecbe80 (diff)
parentaa011ee002adb92a9694706ec08626e0b2ad9572 (diff)
downloadplatform_hardware_interfaces-2d4681b397c3d15e66bed2734ec4c17817e699de.tar.gz
platform_hardware_interfaces-2d4681b397c3d15e66bed2734ec4c17817e699de.tar.bz2
platform_hardware_interfaces-2d4681b397c3d15e66bed2734ec4c17817e699de.zip
Merge "Vr HAL uses "default" service name"
Diffstat (limited to 'vr')
-rw-r--r--vr/1.0/default/Vr.cpp6
-rw-r--r--vr/1.0/default/service.cpp2
-rw-r--r--vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp4
3 files changed, 5 insertions, 7 deletions
diff --git a/vr/1.0/default/Vr.cpp b/vr/1.0/default/Vr.cpp
index a0de998359..345db99461 100644
--- a/vr/1.0/default/Vr.cpp
+++ b/vr/1.0/default/Vr.cpp
@@ -42,16 +42,16 @@ Return<void> Vr::setVrMode(bool enabled) {
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 c27ceafeda..22fb7d10e7 100644
--- a/vr/1.0/default/service.cpp
+++ b/vr/1.0/default/service.cpp
@@ -23,5 +23,5 @@ using android::hardware::vr::V1_0::IVr;
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 29888fd8cc..c7ec07627c 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::Return;
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);
}