From fdbe989808c6cd0b41e81826864611811379644d Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Tue, 20 Nov 2018 10:05:59 -0800 Subject: [PATCH] Merge VrHAL logic into PowerHAL Bug: 110166984 Test: Use daydream and camera Change-Id: I8bfbe7b5f899d78b781b91834ca361b3ccb120b6 --- device.mk | 4 - init.hardware.rc | 2 +- manifest.xml | 9 -- power-libperfmgr/Power.cpp | 45 +-------- power-libperfmgr/Power.h | 1 + ...ware.power@1.2-service.wahoo-libperfmgr.rc | 17 +++- powerhint.json | 74 ++++++++++++++- sepolicy/vendor/hal_power_default.te | 3 + sepolicy/vendor/hal_vr.te | 6 -- sepolicy/vendor/property_contexts | 3 +- sepolicy/vendor/vendor_init.te | 3 + vr/Android.bp | 30 ------ vr/NOTICE | 10 -- vr/VrDevice.cpp | 92 ------------------- vr/VrDevice.h | 48 ---------- vr/android.hardware.vr@1.0-service.wahoo.rc | 10 -- vr/service.cpp | 38 -------- 17 files changed, 102 insertions(+), 293 deletions(-) delete mode 100644 sepolicy/vendor/hal_vr.te delete mode 100644 vr/Android.bp delete mode 100644 vr/NOTICE delete mode 100644 vr/VrDevice.cpp delete mode 100644 vr/VrDevice.h delete mode 100644 vr/android.hardware.vr@1.0-service.wahoo.rc delete mode 100644 vr/service.cpp diff --git a/device.mk b/device.mk index 9f1c8251..8b2dcc3d 100755 --- a/device.mk +++ b/device.mk @@ -452,10 +452,6 @@ PRODUCT_PACKAGES += \ android.hardware.gnss@1.0-impl-qti \ android.hardware.gnss@1.0-service-qti -# VR HAL -PRODUCT_PACKAGES += \ - android.hardware.vr@1.0-service.wahoo \ - PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/sec_config:$(TARGET_COPY_OUT_VENDOR)/etc/sec_config diff --git a/init.hardware.rc b/init.hardware.rc index 951b8db5..17a225f9 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -506,7 +506,7 @@ on property:init.svc.zygote=running on property:init.svc.zygote=stopped stop vendor.folio_daemon -service vendor.thermal-engine /vendor/bin/thermal-engine -c ${sys.qcom.thermalcfg:-/vendor/etc/thermal-engine.conf} +service vendor.thermal-engine /vendor/bin/thermal-engine -c ${vendor.qcom.thermalcfg:-/vendor/etc/thermal-engine.conf} class hal user root group root system diag diff --git a/manifest.xml b/manifest.xml index 65b2cc23..59a0083f 100644 --- a/manifest.xml +++ b/manifest.xml @@ -330,15 +330,6 @@ default - - android.hardware.vr - hwbinder - 1.0 - - IVr - default - - android.hardware.weaver hwbinder diff --git a/power-libperfmgr/Power.cpp b/power-libperfmgr/Power.cpp index 0b36c9e9..9bf42bed 100644 --- a/power-libperfmgr/Power.cpp +++ b/power-libperfmgr/Power.cpp @@ -61,7 +61,10 @@ Power::Power() : mInitThread = std::thread([this](){ android::base::WaitForProperty(kPowerHalInitProp, "1"); - mHintManager = HintManager::GetFromJSON("/vendor/etc/powerhint.json"); + mHintManager = HintManager::GetFromJSON(kPowerHalConfigPath); + if (!mHintManager) { + LOG(FATAL) << "Invalid config: " << kPowerHalConfigPath; + } mInteractionHandler = std::make_unique(mHintManager); mInteractionHandler->Init(); @@ -88,7 +91,7 @@ Power::Power() : } state = android::base::GetProperty(kPowerHalAudioProp, ""); - if (state == "LOW_LATENCY") { + if (state == "AUDIO_LOW_LATENCY") { ALOGI("Initialize with AUDIO_LOW_LATENCY on"); mHintManager->DoHint("AUDIO_LOW_LATENCY"); } @@ -131,17 +134,11 @@ Return Power::powerHint(PowerHint_1_0 hint, int32_t data) { ATRACE_INT("video_encode_lock", 1); mHintManager->DoHint("VIDEO_ENCODE"); ALOGD("VIDEO_ENCODE ON"); - if (!android::base::SetProperty(kPowerHalStateProp, "VIDEO_ENCODE")) { - ALOGE("%s: could not set powerHAL state property to VIDEO_ENCODE", __func__); - } mEncoderModeOn = true; } else { ATRACE_INT("video_encode_lock", 0); mHintManager->EndHint("VIDEO_ENCODE"); ALOGD("VIDEO_ENCODE OFF"); - if (!android::base::SetProperty(kPowerHalStateProp, "")) { - ALOGE("%s: could not clear powerHAL state property", __func__); - } mEncoderModeOn = false; } } @@ -152,15 +149,9 @@ Return Power::powerHint(PowerHint_1_0 hint, int32_t data) { ALOGD("SUSTAINED_PERFORMANCE ON"); if (!mVRModeOn) { // Sustained mode only. mHintManager->DoHint("SUSTAINED_PERFORMANCE"); - if (!android::base::SetProperty(kPowerHalStateProp, "SUSTAINED_PERFORMANCE")) { - ALOGE("%s: could not set powerHAL state property to SUSTAINED_PERFORMANCE", __func__); - } } else { // Sustained + VR mode. mHintManager->EndHint("VR_MODE"); mHintManager->DoHint("VR_SUSTAINED_PERFORMANCE"); - if (!android::base::SetProperty(kPowerHalStateProp, "VR_SUSTAINED_PERFORMANCE")) { - ALOGE("%s: could not set powerHAL state property to VR_SUSTAINED_PERFORMANCE", __func__); - } } mSustainedPerfModeOn = true; } else if (!data && mSustainedPerfModeOn) { @@ -169,13 +160,6 @@ Return Power::powerHint(PowerHint_1_0 hint, int32_t data) { mHintManager->EndHint("SUSTAINED_PERFORMANCE"); if (mVRModeOn) { // Switch back to VR Mode. mHintManager->DoHint("VR_MODE"); - if (!android::base::SetProperty(kPowerHalStateProp, "VR_MODE")) { - ALOGE("%s: could not set powerHAL state property to VR_MODE", __func__); - } - } else { - if (!android::base::SetProperty(kPowerHalStateProp, "")) { - ALOGE("%s: could not clear powerHAL state property", __func__); - } } mSustainedPerfModeOn = false; } @@ -185,15 +169,9 @@ Return Power::powerHint(PowerHint_1_0 hint, int32_t data) { ALOGD("VR_MODE ON"); if (!mSustainedPerfModeOn) { // VR mode only. mHintManager->DoHint("VR_MODE"); - if (!android::base::SetProperty(kPowerHalStateProp, "VR_MODE")) { - ALOGE("%s: could not set powerHAL state property to VR_MODE", __func__); - } } else { // Sustained + VR mode. mHintManager->EndHint("SUSTAINED_PERFORMANCE"); mHintManager->DoHint("VR_SUSTAINED_PERFORMANCE"); - if (!android::base::SetProperty(kPowerHalStateProp, "VR_SUSTAINED_PERFORMANCE")) { - ALOGE("%s: could not set powerHAL state property to VR_SUSTAINED_PERFORMANCE", __func__); - } } mVRModeOn = true; } else if (!data && mVRModeOn) { @@ -202,13 +180,6 @@ Return Power::powerHint(PowerHint_1_0 hint, int32_t data) { mHintManager->EndHint("VR_MODE"); if (mSustainedPerfModeOn) { // Switch back to sustained Mode. mHintManager->DoHint("SUSTAINED_PERFORMANCE"); - if (!android::base::SetProperty(kPowerHalStateProp, "SUSTAINED_PERFORMANCE")) { - ALOGE("%s: could not set powerHAL state property to SUSTAINED_PERFORMANCE", __func__); - } - } else { - if (!android::base::SetProperty(kPowerHalStateProp, "")) { - ALOGE("%s: could not clear powerHAL state property", __func__); - } } mVRModeOn = false; } @@ -440,16 +411,10 @@ Return Power::powerHintAsync_1_2(PowerHint_1_2 hint, int32_t data) { ATRACE_INT("audio_low_latency_lock", 1); mHintManager->DoHint("AUDIO_LOW_LATENCY"); ALOGD("AUDIO LOW LATENCY ON"); - if (!android::base::SetProperty(kPowerHalAudioProp, "LOW_LATENCY")) { - ALOGE("%s: could not set powerHAL audio state property to LOW_LATENCY", __func__); - } } else { ATRACE_INT("audio_low_latency_lock", 0); mHintManager->EndHint("AUDIO_LOW_LATENCY"); ALOGD("AUDIO LOW LATENCY OFF"); - if (!android::base::SetProperty(kPowerHalAudioProp, "")) { - ALOGE("%s: could not clear powerHAL audio state property", __func__); - } } ATRACE_END(); break; diff --git a/power-libperfmgr/Power.h b/power-libperfmgr/Power.h index 61529b20..265d5c4b 100644 --- a/power-libperfmgr/Power.h +++ b/power-libperfmgr/Power.h @@ -45,6 +45,7 @@ using ::android::perfmgr::HintManager; constexpr char kPowerHalStateProp[] = "vendor.powerhal.state"; constexpr char kPowerHalAudioProp[] = "vendor.powerhal.audio"; constexpr char kPowerHalInitProp[] = "vendor.powerhal.init"; +constexpr char kPowerHalConfigPath[] = "/vendor/etc/powerhint.json"; struct Power : public IPower { // Methods from ::android::hardware::power::V1_0::IPower follow. diff --git a/power-libperfmgr/android.hardware.power@1.2-service.wahoo-libperfmgr.rc b/power-libperfmgr/android.hardware.power@1.2-service.wahoo-libperfmgr.rc index d77b8f05..1ab6f63d 100644 --- a/power-libperfmgr/android.hardware.power@1.2-service.wahoo-libperfmgr.rc +++ b/power-libperfmgr/android.hardware.power@1.2-service.wahoo-libperfmgr.rc @@ -12,10 +12,23 @@ on property:init.svc.zygote=restarting && property:vendor.powerhal.state=* # restart powerHAL when cameraHAL died on property:init.svc.vendor.camera-provider-2-4=restarting && property:vendor.powerhal.state=VIDEO_ENCODE setprop vendor.powerhal.state "" - setprop vendor.powerhal.audio "" restart vendor.power-hal-1-2 # restart powerHAL when audioHAL died -on property:init.svc.vendor.audio-hal-2-0=restarting && property:vendor.powerhal.audio=LOW_LATENCY +on property:init.svc.vendor.audio-hal-2-0=restarting && property:vendor.powerhal.audio=AUDIO_LOW_LATENCY setprop vendor.powerhal.audio "" restart vendor.power-hal-1-2 + +# reset touch and thermal-engine config when framework died and thermal-engine is in VR mode +on property:init.svc.zygote=restarting && property:vendor.qcom.thermalcfg=/vendor/etc/thermal-engine-vr.conf + write /sys/devices/virtual/input/ftm4_touch/vrmode 0 + setprop vendor.qcom.thermalcfg "/vendor/etc/thermal-engine.conf" + +on property:vendor.qcom.thermalcfg=* + restart vendor.thermal-engine + +on property:ro.hardware=taimen && property:vendor.qcom.thermalcfg=/vendor/etc/thermal-engine-vr.conf + write /sys/devices/virtual/input/ftm4_touch/vrmode 1 + +on property:ro.hardware=taimen && property:vendor.qcom.thermalcfg=/vendor/etc/thermal-engine.conf + write /sys/devices/virtual/input/ftm4_touch/vrmode 0 diff --git a/powerhint.json b/powerhint.json index f0789744..216df91c 100644 --- a/powerhint.json +++ b/powerhint.json @@ -134,15 +134,57 @@ "100" ], "HoldFd": true + }, + { + "Name": "PowerHALMainState", + "Path": "vendor.powerhal.state", + "Values": [ + "VIDEO_ENCODE", + "VR_SUSTAINED_PERFORMANCE", + "SUSTAINED_PERFORMANCE", + "VR_MODE", + "" + ], + "Type": "Property" + }, + { + "Name": "PowerHALAudioState", + "Path": "vendor.powerhal.audio", + "Values": [ + "AUDIO_LOW_LATENCY", + "" + ], + "Type": "Property" + }, + { + "Name": "ThermalConfig", + "Path": "vendor.qcom.thermalcfg", + "Values": [ + "/vendor/etc/thermal-engine-vr.conf", + "/vendor/etc/thermal-engine.conf" + ], + "Type": "Property" } ], "Actions": [ + { + "PowerHint": "VIDEO_ENCODE", + "Node": "PowerHALMainState", + "Duration": 0, + "Value": "VIDEO_ENCODE" + }, { "PowerHint": "VIDEO_ENCODE", "Node": "CPUBigClusterMaxFreq", "Duration": 0, "Value": "1958400" }, + { + "PowerHint": "SUSTAINED_PERFORMANCE", + "Node": "PowerHALMainState", + "Duration": 0, + "Value": "SUSTAINED_PERFORMANCE" + }, { "PowerHint": "SUSTAINED_PERFORMANCE", "Node": "CPUBigClusterMaxFreq", @@ -161,6 +203,18 @@ "Duration": 0, "Value": "342000000" }, + { + "PowerHint": "VR_MODE", + "Node": "PowerHALMainState", + "Duration": 0, + "Value": "VR_MODE" + }, + { + "PowerHint": "VR_MODE", + "Node": "ThermalConfig", + "Duration": 0, + "Value": "/vendor/etc/thermal-engine-vr.conf" + }, { "PowerHint": "VR_MODE", "Node": "CPUBigClusterMaxFreq", @@ -203,6 +257,18 @@ "Duration": 0, "Value": "11863" }, + { + "PowerHint": "VR_SUSTAINED_PERFORMANCE", + "Node": "PowerHALMainState", + "Duration": 0, + "Value": "VR_MODE" + }, + { + "PowerHint": "VR_SUSTAINED_PERFORMANCE", + "Node": "ThermalConfig", + "Duration": 0, + "Value": "/vendor/etc/thermal-engine-vr.conf" + }, { "PowerHint": "VR_SUSTAINED_PERFORMANCE", "Node": "CPUBigClusterMaxFreq", @@ -443,6 +509,12 @@ "Duration": 2000, "Value": "44" }, + { + "PowerHint": "AUDIO_LOW_LATENCY", + "Node": "PowerHALAudioState", + "Duration": 0, + "Value": "AUDIO_LOW_LATENCY" + }, { "PowerHint": "AUDIO_LOW_LATENCY", "Node": "PMQoSCpuDmaLatency", @@ -450,4 +522,4 @@ "Value": "44" } ] -} \ No newline at end of file +} diff --git a/sepolicy/vendor/hal_power_default.te b/sepolicy/vendor/hal_power_default.te index dce10ed5..6bf6c8b0 100644 --- a/sepolicy/vendor/hal_power_default.te +++ b/sepolicy/vendor/hal_power_default.te @@ -20,3 +20,6 @@ allow hal_power_default cgroup:file rw_file_perms; # To get/set powerhal state property set_prop(hal_power_default, power_prop) + +# interact with thermal_config +set_prop(hal_power_default, thermal_prop) diff --git a/sepolicy/vendor/hal_vr.te b/sepolicy/vendor/hal_vr.te deleted file mode 100644 index a88dcb82..00000000 --- a/sepolicy/vendor/hal_vr.te +++ /dev/null @@ -1,6 +0,0 @@ -# interact with thermal_config -set_prop(hal_vr, thermal_prop) - -# Access to touch vrmode node -allow hal_vr sysfs_touch:dir r_dir_perms; -allow hal_vr sysfs_touch:file rw_file_perms; diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts index 9d4597da..be80c931 100644 --- a/sepolicy/vendor/property_contexts +++ b/sepolicy/vendor/property_contexts @@ -16,8 +16,7 @@ vendor.debug.ssrdump u:object_r:vendor_ssr_prop:s0 persist.sys.cnss. u:object_r:cnss_diag_prop:s0 sys.listeners.registered u:object_r:tee_listener_prop:s0 wc_transport. u:object_r:wc_prop:s0 -sys.qcom.thermalcfg u:object_r:thermal_prop:s0 -ctl.vendor.thermal-engine u:object_r:thermal_prop:s0 +vendor.qcom.thermalcfg u:object_r:thermal_prop:s0 persist.sys.modem.diag. u:object_r:modem_diag_prop:s0 sys.modem.diag. u:object_r:modem_diag_prop:s0 sys.time.set u:object_r:sys_time_prop:s0 diff --git a/sepolicy/vendor/vendor_init.te b/sepolicy/vendor/vendor_init.te index 5cd77c98..0953dcb0 100644 --- a/sepolicy/vendor/vendor_init.te +++ b/sepolicy/vendor/vendor_init.te @@ -33,3 +33,6 @@ dontaudit vendor_init unlabeled:file getattr; allow vendor_init debugfs_tracing_instances:dir create_dir_perms; allow vendor_init debugfs_tracing_instances:file w_file_perms; + +# Write to touch vrmode node +allow vendor_init sysfs_touch:file w_file_perms; diff --git a/vr/Android.bp b/vr/Android.bp deleted file mode 100644 index 99aef7d8..00000000 --- a/vr/Android.bp +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright (C) 2017 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -cc_binary { - name: "android.hardware.vr@1.0-service.wahoo", - relative_install_path: "hw", - init_rc: ["android.hardware.vr@1.0-service.wahoo.rc"], - srcs: ["service.cpp", "VrDevice.cpp"], - cflags: ["-Werror", "-Wall"], - shared_libs: [ - "libbase", - "libhidlbase", - "libhidltransport", - "liblog", - "libutils", - "android.hardware.vr@1.0", - ], - proprietary: true, -} diff --git a/vr/NOTICE b/vr/NOTICE deleted file mode 100644 index 667db97b..00000000 --- a/vr/NOTICE +++ /dev/null @@ -1,10 +0,0 @@ -Copyright (C) 2017 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/vr/VrDevice.cpp b/vr/VrDevice.cpp deleted file mode 100644 index e5cd94dd..00000000 --- a/vr/VrDevice.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "VrDevice" - -#include -#include -#include -#include - -#include "VrDevice.h" - -namespace android { -namespace hardware { -namespace vr { -namespace V1_0 { -namespace implementation { - -constexpr char kTouchVRModeSysfs[] = "/sys/devices/virtual/input/ftm4_touch/vrmode"; - -VrDevice::VrDevice() : mVRmode(false) { - std::string hardware = android::base::GetProperty("ro.hardware", ""); - if (hardware == "taimen") { - mFtm4Touch = true; - } else { - mFtm4Touch = false; - } -} - -Return VrDevice::init() { - // NOOP - return Void(); -} - -Return VrDevice::setVrMode(bool enabled) { - mVRmode = enabled; - if (enabled) { - if (!android::base::SetProperty("sys.qcom.thermalcfg", - "/vendor/etc/thermal-engine-vr.conf")) { - LOG(ERROR) << "Couldn't set thermal_engine enable property"; - return Void(); - } - } else { - if (!android::base::SetProperty("sys.qcom.thermalcfg", - "/vendor/etc/thermal-engine.conf")) { - LOG(ERROR) << "Couldn't set thermal_engine disable property"; - return Void(); - } - } - if (!android::base::SetProperty("ctl.restart", "vendor.thermal-engine")) { - LOG(ERROR) << "Couldn't set thermal_engine restart property"; - } - - if (mFtm4Touch && - !android::base::WriteStringToFile((enabled ? "1" : "0"), kTouchVRModeSysfs)) { - PLOG(ERROR) << "Failed to write to vrmode sysfs node with :" << enabled; - } - - return Void(); -} - -Return VrDevice::debug(const hidl_handle& handle, const hidl_vec&) { - if (handle != nullptr && handle->numFds >= 1) { - int fd = handle->data[0]; - std::string buf(android::base::StringPrintf("VRMode: %s\n", - (mVRmode ? "true" : "false"))); - if (!android::base::WriteStringToFd(buf, fd)) { - PLOG(ERROR) << "Failed to dump state to fd"; - } - fsync(fd); - } - return Void(); -} - -} // namespace implementation -} // namespace V1_0 -} // namespace vr -} // namespace hardware -} // namespace android diff --git a/vr/VrDevice.h b/vr/VrDevice.h deleted file mode 100644 index 7bc3e149..00000000 --- a/vr/VrDevice.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef ANDROID_HARDWARE_VR_V1_0_VR_H -#define ANDROID_HARDWARE_VR_V1_0_VR_H - -#include - -namespace android { -namespace hardware { -namespace vr { -namespace V1_0 { -namespace implementation { - -using ::android::hardware::vr::V1_0::IVr; -using ::android::hardware::Return; - -struct VrDevice : public IVr { - VrDevice(); - - Return init() override; - Return setVrMode(bool enabled) override; - Return debug(const hidl_handle& handle, const hidl_vec&) override; - private: - // Taimen display touch sensitivity for VR Mode (b/37515573) - bool mFtm4Touch; - bool mVRmode; -}; - -} // namespace implementation -} // namespace V1_0 -} // namespace vr -} // namespace hardware -} // namespace android - -#endif // ANDROID_HARDWARE_VR_V1_0_VR_H diff --git a/vr/android.hardware.vr@1.0-service.wahoo.rc b/vr/android.hardware.vr@1.0-service.wahoo.rc deleted file mode 100644 index 10f3ac96..00000000 --- a/vr/android.hardware.vr@1.0-service.wahoo.rc +++ /dev/null @@ -1,10 +0,0 @@ -service vendor.vr-wahoo-1-0 /vendor/bin/hw/android.hardware.vr@1.0-service.wahoo - class hal - user system - group system - -# reset touch and thermal-engine when framework died and thermal-engine is in VR mode -on property:init.svc.zygote=restarting && property:sys.qcom.thermalcfg=/vendor/etc/thermal-engine-vr.conf - write /sys/devices/virtual/input/ftm4_touch/vrmode 0 - setprop sys.qcom.thermalcfg "/vendor/etc/thermal-engine.conf" - restart vendor.thermal-engine diff --git a/vr/service.cpp b/vr/service.cpp deleted file mode 100644 index a04991b0..00000000 --- a/vr/service.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#define LOG_TAG "android.hardware.vr@1.0-service.wahoo" - -#include -#include -#include -#include - -#include "VrDevice.h" - -using ::android::hardware::configureRpcThreadpool; -using ::android::hardware::joinRpcThreadpool; -using ::android::hardware::vr::V1_0::implementation::VrDevice; -using ::android::hardware::vr::V1_0::IVr; -using ::android::sp; - -int main(int /* argc */, char* /* argv */ []) { - sp vr = new VrDevice; - configureRpcThreadpool(1, true); - CHECK_EQ(vr->registerAsService(), android::NO_ERROR) - << "Failed to register vr HAL"; - joinRpcThreadpool(); - return 0; -}