Loading services/core/jni/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -192,7 +192,6 @@ cc_defaults { "android.hardware.tv.input@1.0", "android.hardware.tv.input-V3-ndk", "android.hardware.vibrator-V3-ndk", "android.hardware.vr@1.0", "android.hidl.token@1.0-utils", "android.frameworks.schedulerservice@1.0", "android.frameworks.sensorservice@1.0", Loading services/core/jni/com_android_server_vr_VrManagerService.cpp +4 −27 Original line number Diff line number Diff line Loading @@ -19,44 +19,21 @@ #include <android_runtime/AndroidRuntime.h> #include <jni.h> #include <nativehelper/JNIHelp.h> #include <android/hardware/vr/1.0/IVr.h> #include <utils/Errors.h> #include <utils/Log.h> namespace android { using ::android::hardware::vr::V1_0::IVr; static sp<IVr> gVr; static void init_native(JNIEnv* /* env */, jclass /* clazz */) { // TODO(b/31632518) if (gVr != nullptr) { // This call path should never be hit. ALOGE("%s: May not initialize IVr interface module more than once!", __FUNCTION__); return; } gVr = IVr::getService(); if (gVr == nullptr) { ALOGW("%s: Could not open IVr interface", __FUNCTION__); ALOGW("%s: Could not open IVr interface as it no longer supported", __FUNCTION__); return; } gVr->init(); } static void setVrMode_native(JNIEnv* /* env */, jclass /* clazz */, jboolean enabled) { if (gVr == nullptr) { // There is no VR hardware module implemented, do nothing. ALOGW("%s: Could not use IVr interface as it no longer supported", __FUNCTION__); return; } // Call set_vr_mode method, this must be implemented if the HAL exists. gVr->setVrMode(static_cast<bool>(enabled)); } static const JNINativeMethod method_table[] = { { "initializeNative", "()V", (void*)init_native }, { "setVrModeNative", "(Z)V", (void*)setVrMode_native }, Loading services/tests/mockingservicestests/jni/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ cc_library_shared { "android.hardware.graphics.common@1.2", "android.hardware.graphics.mapper@4.0", "android.hardware.ir@1.0", "android.hardware.vr@1.0", "android.hidl.token@1.0-utils", ], } services/tests/servicestests/jni/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ cc_library_shared { "android.hardware.graphics.common@1.2", "android.hardware.graphics.mapper@4.0", "android.hardware.ir@1.0", "android.hardware.vr@1.0", "android.hidl.token@1.0-utils", ], } Loading
services/core/jni/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -192,7 +192,6 @@ cc_defaults { "android.hardware.tv.input@1.0", "android.hardware.tv.input-V3-ndk", "android.hardware.vibrator-V3-ndk", "android.hardware.vr@1.0", "android.hidl.token@1.0-utils", "android.frameworks.schedulerservice@1.0", "android.frameworks.sensorservice@1.0", Loading
services/core/jni/com_android_server_vr_VrManagerService.cpp +4 −27 Original line number Diff line number Diff line Loading @@ -19,44 +19,21 @@ #include <android_runtime/AndroidRuntime.h> #include <jni.h> #include <nativehelper/JNIHelp.h> #include <android/hardware/vr/1.0/IVr.h> #include <utils/Errors.h> #include <utils/Log.h> namespace android { using ::android::hardware::vr::V1_0::IVr; static sp<IVr> gVr; static void init_native(JNIEnv* /* env */, jclass /* clazz */) { // TODO(b/31632518) if (gVr != nullptr) { // This call path should never be hit. ALOGE("%s: May not initialize IVr interface module more than once!", __FUNCTION__); return; } gVr = IVr::getService(); if (gVr == nullptr) { ALOGW("%s: Could not open IVr interface", __FUNCTION__); ALOGW("%s: Could not open IVr interface as it no longer supported", __FUNCTION__); return; } gVr->init(); } static void setVrMode_native(JNIEnv* /* env */, jclass /* clazz */, jboolean enabled) { if (gVr == nullptr) { // There is no VR hardware module implemented, do nothing. ALOGW("%s: Could not use IVr interface as it no longer supported", __FUNCTION__); return; } // Call set_vr_mode method, this must be implemented if the HAL exists. gVr->setVrMode(static_cast<bool>(enabled)); } static const JNINativeMethod method_table[] = { { "initializeNative", "()V", (void*)init_native }, { "setVrModeNative", "(Z)V", (void*)setVrMode_native }, Loading
services/tests/mockingservicestests/jni/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ cc_library_shared { "android.hardware.graphics.common@1.2", "android.hardware.graphics.mapper@4.0", "android.hardware.ir@1.0", "android.hardware.vr@1.0", "android.hidl.token@1.0-utils", ], }
services/tests/servicestests/jni/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ cc_library_shared { "android.hardware.graphics.common@1.2", "android.hardware.graphics.mapper@4.0", "android.hardware.ir@1.0", "android.hardware.vr@1.0", "android.hidl.token@1.0-utils", ], }