diff --git a/android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java b/android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java index 54e4526e0c40..1e3edd9f0700 100644 --- a/android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java +++ b/android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java @@ -35,6 +35,7 @@ import com.android.installreferrer.api.InstallReferrerStateListener; import com.android.installreferrer.api.ReferrerDetails; +import org.chromium.base.BraveFeatureList; import org.chromium.base.BravePreferenceKeys; import org.chromium.base.Log; import org.chromium.base.ThreadUtils; @@ -42,7 +43,7 @@ import org.chromium.chrome.browser.BraveLocalState; import org.chromium.chrome.browser.back_press.SecondaryActivityBackPressUma.SecondaryActivity; import org.chromium.chrome.browser.customtabs.CustomTabActivity; -import org.chromium.chrome.browser.day_zero.DayZeroHelper; +import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.metrics.ChangeMetricsReportingStateCalledFrom; import org.chromium.chrome.browser.metrics.UmaSessionStats; import org.chromium.chrome.browser.onboarding.OnboardingPrefManager; @@ -231,7 +232,11 @@ private void onClickViews() { } private boolean shouldForceDefaultBrowserPrompt() { - return !DayZeroHelper.getDayZeroExptFlag() && !isDefaultBrowser(); + return isNewOnabordingEnabled() && !isDefaultBrowser(); + } + + private boolean isNewOnabordingEnabled() { + return ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_NEW_ANDROID_ONBOARDING); } private void setDefaultBrowserAndProceedToNextStep() { @@ -260,7 +265,7 @@ private void nextOnboardingStep() { if (mCurrentStep == 0) { showIntroPage(); } else if (mCurrentStep == 1) { - if (DayZeroHelper.getDayZeroExptFlag() + if (!isNewOnabordingEnabled() || !BraveSetDefaultBrowserUtils.supportsDefaultRoleManager()) { showBrowserSelectionPage(); } else if (!isDefaultBrowser()) { @@ -317,8 +322,7 @@ public void run() { }, 200); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU - && DayZeroHelper.getDayZeroExptFlag()) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && !isNewOnabordingEnabled()) { mRequestPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS); } else { startTimer(3000); diff --git a/chromium_src/chrome/browser/flags/android/chrome_feature_list.cc b/chromium_src/chrome/browser/flags/android/chrome_feature_list.cc index e5ee35b74f18..afbe295d89e8 100644 --- a/chromium_src/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chromium_src/chrome/browser/flags/android/chrome_feature_list.cc @@ -6,6 +6,7 @@ #include "base/feature_override.h" #include "brave/browser/android/background_video/features.h" #include "brave/browser/android/safe_browsing/features.h" +#include "brave/browser/brave_browser_features.h" #include "brave/components/ai_chat/core/common/features.h" #include "brave/components/brave_news/common/features.h" #include "brave/components/brave_rewards/common/features.h" @@ -45,6 +46,7 @@ &net::features::kBraveForgetFirstPartyStorage, \ &brave_shields::features::kBraveShowStrictFingerprintingMode, \ &brave_shields::features::kBraveLocalhostAccessPermission, \ + &features::kNewAndroidOnboarding, \ &brave_shields::features::kBlockAllCookiesToggle // clang-format on