LeOSium_old/patches/0001-Vanadium/0015-disable-first-run-welc...

49 lines
2.4 KiB
Diff
Raw Normal View History

2023-11-18 11:23:04 +01:00
From 0000000000000000000000000000000000000000 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 1ed0ad476b512..fb390474ccaf0 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
@@ -44,15 +44,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;
}
/**