Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java |
| index b0733e290835e229bd0a5e642196f0161124b6b0..e5409db089c97a6ad8f01dbcd9fbb4a0bfc8d194 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java |
| @@ -29,6 +29,7 @@ import org.chromium.chrome.browser.services.AndroidEduAndChildAccountHelper; |
| import org.chromium.chrome.browser.signin.SigninManager; |
| import org.chromium.chrome.browser.util.FeatureUtilities; |
| import org.chromium.chrome.browser.util.IntentUtils; |
| +import org.chromium.chrome.browser.vr_shell.VrShellDelegate; |
| import org.chromium.components.signin.AccountManagerHelper; |
| import org.chromium.components.signin.ChromeSigninController; |
| @@ -405,12 +406,21 @@ public abstract class FirstRunFlowSequencer { |
| } |
| } |
| + boolean isVrIntent = VrShellDelegate.isVrIntent(intent); |
| + if (isVrIntent) { |
| + // Remove VR-specific extras from the intent to Chrome because we don't want the |
| + // VR intent to auto-present after the FRE is complete. |
| + VrShellDelegate.removeVrExtras(intent); |
| + } |
| // Add a PendingIntent so that the intent used to launch Chrome will be resent when |
| // First Run is completed or canceled. |
| addPendingIntent(caller, freIntent, intent, requiresBroadcast); |
| freIntent.putExtra(FirstRunActivity.EXTRA_FINISH_ON_TOUCH_OUTSIDE, true); |
| if (!(caller instanceof Activity)) freIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| + if (isVrIntent) { |
| + freIntent = VrShellDelegate.setupVrFreIntent(caller, freIntent); |
|
mthiesse
2017/07/12 14:44:46
nit: Move this onto previous line and get rid of b
ymalik
2017/07/12 15:33:03
Done.
|
| + } |
| IntentUtils.safeStartActivity(caller, freIntent); |
| } else { |
| // First Run requires that the Intent contains NEW_TASK so that it doesn't sit on top |