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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java

Issue 2062083002: Implements the Lightweight First Run Experience (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/document/ChromeLauncherActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
index 04df80940ab7f824a260907627237f5ecaf7ad09..a7d5763f316ea45be01d14a1f75890e39dea9438 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
@@ -188,6 +188,14 @@ public class ChromeLauncherActivity extends Activity
// Check if we should launch the ChromeTabbedActivity.
if (!mIsCustomTabIntent && !FeatureUtilities.isDocumentMode(this)) {
+ // Launch the First Run Experience for VIEW Intents with URLs before launching
+ // ChromeTabbedActivity if necessary.
+ if (getIntent() != null && getIntent().getAction() == Intent.ACTION_VIEW
+ && IntentHandler.getUrlFromIntent(getIntent()) != null) {
+ if (launchFirstRunExperience()) {
+ return;
+ }
+ }
launchTabbedMode();
finish();
return;
@@ -461,10 +469,8 @@ public class ChromeLauncherActivity extends Activity
* @return Whether or not the First Run Experience needed to be shown.
*/
private boolean launchFirstRunExperience() {
- final boolean isIntentActionMain = getIntent() != null
- && TextUtils.equals(getIntent().getAction(), Intent.ACTION_MAIN);
- final Intent freIntent = FirstRunFlowSequencer.checkIfFirstRunIsNecessary(
- this, isIntentActionMain);
+ final Intent freIntent =
+ FirstRunFlowSequencer.checkIfFirstRunIsNecessary(this, getIntent());
if (freIntent == null) return false;
if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {

Powered by Google App Engine
This is Rietveld 408576698