| From 565528abd8ddd9c4c8eb08d54468a862729a1352 Mon Sep 17 00:00:00 2001 |
| From: csagan5 <32685696+csagan5@users.noreply.github.com> |
| Date: Sun, 26 Nov 2017 22:51:43 +0100 |
| Subject: [PATCH] disable first run welcome page |
| |
| --- |
| .../org/chromium/chrome/browser/firstrun/FirstRunUtils.java | 3 --- |
| .../chromium/chrome/browser/firstrun/FirstRunStatus.java | 6 +++++- |
| 2 files changed, 5 insertions(+), 4 deletions(-) |
| |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java |
| index 8e32e791835ad..8c4063623324b 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java |
| @@ -43,15 +43,12 @@ public class FirstRunUtils { |
| boolean javaPrefValue = |
| javaPrefs.readBoolean(ChromePreferenceKeys.FIRST_RUN_CACHED_TOS_ACCEPTED, false); |
| boolean nativePrefValue = isFirstRunEulaAccepted(); |
| - boolean isFirstRunComplete = FirstRunStatus.getFirstRunFlowComplete(); |
| - if (javaPrefValue || nativePrefValue || isFirstRunComplete) { |
| if (!javaPrefValue) { |
| javaPrefs.writeBoolean(ChromePreferenceKeys.FIRST_RUN_CACHED_TOS_ACCEPTED, true); |
| } |
| if (!nativePrefValue) { |
| setEulaAccepted(); |
| } |
| - } |
| } |
| |
| /** |
| diff --git a/chrome/browser/first_run/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java b/chrome/browser/first_run/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java |
| index 46536c7cdd988..59d5c8d322e1f 100644 |
| --- a/chrome/browser/first_run/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java |
| +++ b/chrome/browser/first_run/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java |
| @@ -43,8 +43,12 @@ public class FirstRunStatus { |
| * includes ToS and Sign In pages if necessary. |
| */ |
| public static boolean getFirstRunFlowComplete() { |
| - return SharedPreferencesManager.getInstance().readBoolean( |
| + boolean complete = SharedPreferencesManager.getInstance().readBoolean( |
| ChromePreferenceKeys.FIRST_RUN_FLOW_COMPLETE, false); |
| + if (!complete) { |
| + setFirstRunFlowComplete(true); |
| + } |
| + return true; |
| } |
| |
| /** |