Commit f948761e authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

VR: Disable VR on standalone VR devices.

Bug: 841850
Change-Id: I0249210c8fe387a3732715be2650ce9aea5af800
Reviewed-on: https://chromium-review.googlesource.com/1054211Reviewed-by: default avatarBiao She <bshe@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557623}
parent 0425e2ac
...@@ -155,6 +155,7 @@ public class VrIntentUtils { ...@@ -155,6 +155,7 @@ public class VrIntentUtils {
* @return Options that a VR-specific Chrome activity should be launched with. * @return Options that a VR-specific Chrome activity should be launched with.
*/ */
public static Bundle getVrIntentOptions(Context context) { public static Bundle getVrIntentOptions(Context context) {
if (!VrShellDelegate.isVrEnabled()) return null;
// These options are used to start the Activity with a custom animation to keep it hidden // These options are used to start the Activity with a custom animation to keep it hidden
// for a few hundred milliseconds - enough time for us to draw the first black view. // for a few hundred milliseconds - enough time for us to draw the first black view.
// The animation is sufficient to hide the 2D screenshot but not to the 2D UI while the // The animation is sufficient to hide the 2D screenshot but not to the 2D UI while the
......
...@@ -788,6 +788,8 @@ public class VrShellDelegate ...@@ -788,6 +788,8 @@ public class VrShellDelegate
*/ */
public static VrClassesWrapper getVrClassesWrapper() { public static VrClassesWrapper getVrClassesWrapper() {
if (sVrClassesWrapper == null) sVrClassesWrapper = createVrClassesWrapper(); if (sVrClassesWrapper == null) sVrClassesWrapper = createVrClassesWrapper();
// Disable VR on standalone VR devices (https://crbug.com/841850).
if (sVrClassesWrapper != null && sVrClassesWrapper.bootsToVr()) return null;
return sVrClassesWrapper; return sVrClassesWrapper;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment