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

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

Issue 2177943002: [Lightweight FRE] Do not show Lightweight FRE if it is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java
index efb22b9295ad31df7874c05c54f4051098665694..f9ece002140661af82ab641422aee63058776f08 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java
@@ -14,7 +14,9 @@ import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
+import org.chromium.base.CommandLine;
import org.chromium.chrome.R;
+import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.browser.EmbedContentViewActivity;
import org.chromium.ui.text.NoUnderlineClickableSpan;
import org.chromium.ui.text.SpanApplier;
@@ -28,6 +30,10 @@ public class LightweightFirstRunActivity extends FirstRunActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ if (CommandLine.getInstance().hasSwitch(ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE)) {
+ completeFirstRunExperience();
+ }
+
setContentView(LayoutInflater.from(LightweightFirstRunActivity.this)
.inflate(R.layout.lightweight_fre_tos, null));
@@ -57,10 +63,7 @@ public class LightweightFirstRunActivity extends FirstRunActivity {
@Override
public void onClick(View v) {
sGlue.acceptTermsOfService(LightweightFirstRunActivity.this, false);
- FirstRunStatus.setLightweightFirstRunFlowComplete(
- LightweightFirstRunActivity.this, true);
- Intent intent = new Intent();
- finishAllTheActivities(getLocalClassName(), Activity.RESULT_OK, intent);
+ completeFirstRunExperience();
}
});
@@ -72,4 +75,12 @@ public class LightweightFirstRunActivity extends FirstRunActivity {
}
});
}
+
+ @Override
+ public void completeFirstRunExperience() {
+ FirstRunStatus.setLightweightFirstRunFlowComplete(LightweightFirstRunActivity.this, true);
+ Intent intent = new Intent();
+ intent.putExtras(mFreProperties);
+ finishAllTheActivities(getLocalClassName(), Activity.RESULT_OK, intent);
+ }
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698