From c81f61c0e005cacd214c5fb9c77783336b43673d Mon Sep 17 00:00:00 2001 From: "Randall E. Barker" Date: Mon, 22 Jul 2019 01:53:51 -0700 Subject: [PATCH] Clean up build flavor usage and fix JNI native signature (#1436) --- .../vrbrowser/ui/widgets/settings/DisplayOptionsView.java | 5 ++--- app/src/main/cpp/BrowserWorld.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/DisplayOptionsView.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/DisplayOptionsView.java index 89f0ccbe1..ace25f8ea 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/DisplayOptionsView.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/DisplayOptionsView.java @@ -74,8 +74,7 @@ private void initialize(Context aContext) { mFoveatedAppRadio = findViewById(R.id.foveated_app_radio); mFoveatedWebVRRadio = findViewById(R.id.foveated_webvr_radio); - if (BuildConfig.FLAVOR_platform == "oculusvr" || - BuildConfig.FLAVOR_platform == "wavevr") { + if (DeviceType.isOculusBuild() || DeviceType.isWaveBuild()) { mFoveatedAppRadio.setVisibility(View.VISIBLE); // Uncomment this when Foveated Rendering for WebVR makes more sense // mFoveatedWebVRRadio.setVisibility(View.VISIBLE); @@ -316,7 +315,7 @@ private void setFoveatedLevel(RadioGroupSetting aSetting, int checkedId, boolean if (doApply) { mWidgetManager.updateFoveatedLevel(); // "WaveVR WVR_RenderFoveation(false) doesn't work properly, we need to restart." - if (level == 0 && BuildConfig.FLAVOR_platform == "wavevr") { + if (level == 0 && DeviceType.isWaveBuild()) { showRestartDialog(); } } diff --git a/app/src/main/cpp/BrowserWorld.cpp b/app/src/main/cpp/BrowserWorld.cpp index 596944179..7ce6cb603 100644 --- a/app/src/main/cpp/BrowserWorld.cpp +++ b/app/src/main/cpp/BrowserWorld.cpp @@ -1436,7 +1436,7 @@ JNI_METHOD(void, runCallbackNative) } JNI_METHOD(void, setCPULevelNative) -(JNIEnv*, jobject, int aCPULevel) { +(JNIEnv*, jobject, jint aCPULevel) { crow::BrowserWorld::Instance().SetCPULevel(static_cast(aCPULevel)); }