Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java

Issue 2980453002: [vr] Show DOFF when starting Chrome with a VR intent without FRE completion (Closed)
Patch Set: make VrFirstRunActivity conditional Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 3de96e67f561bc9781d8bd9a188a19c8cba98a67..de4082e2e368ce00d51d4c24a66211b78b4d3d91 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;
@@ -396,12 +397,19 @@ 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);
IntentUtils.safeStartActivity(caller, freIntent);
} else {
// First Run requires that the Intent contains NEW_TASK so that it doesn't sit on top

Powered by Google App Engine
This is Rietveld 408576698