| Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
|
| index 2f03b0997b1028ab67eea5fc6351c62cc5607c65..90a08007e6c8f290cd4d3f774589ce1cf88f1849 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
|
| @@ -61,7 +61,6 @@ public class VrShellDelegate {
|
|
|
| // TODO(bshe): These should be replaced by string provided by NDK. Currently, it only available
|
| // in SDK and we don't want add dependency to SDK just to get these strings.
|
| - private static final String DAYDREAM_VR_EXTRA = "android.intent.extra.VR_LAUNCH";
|
| private static final String DAYDREAM_CATEGORY = "com.google.intent.category.DAYDREAM";
|
| private static final String CARDBOARD_CATEGORY = "com.google.intent.category.CARDBOARD";
|
|
|
| @@ -174,7 +173,7 @@ public class VrShellDelegate {
|
| public void enterVRFromIntent(Intent intent) {
|
| // Vr Intent is only used on Daydream devices.
|
| if (mVrSupportLevel != VR_DAYDREAM) return;
|
| - assert isVrIntent(intent);
|
| + assert isDaydreamVrIntent(intent);
|
| if (mListeningForWebVrActivateBeforePause && !mRequestedWebVR) {
|
| nativeDisplayActivate(mNativeVrShellDelegate);
|
| return;
|
| @@ -555,14 +554,9 @@ public class VrShellDelegate {
|
| /**
|
| * Whether or not the intent is a Daydream VR Intent.
|
| */
|
| - public boolean isVrIntent(Intent intent) {
|
| - if (intent == null) return false;
|
| - if (intent.getBooleanExtra(DAYDREAM_VR_EXTRA, false)) return true;
|
| - if (intent.getCategories() != null) {
|
| - if (intent.getCategories().contains(DAYDREAM_CATEGORY)) return true;
|
| - if (intent.getCategories().contains(CARDBOARD_CATEGORY)) return true;
|
| - }
|
| - return false;
|
| + public boolean isDaydreamVrIntent(Intent intent) {
|
| + if (intent == null || intent.getCategories() == null) return false;
|
| + return intent.getCategories().contains(DAYDREAM_CATEGORY);
|
| }
|
|
|
| /**
|
|
|