Skip to content

Commit

Permalink
Update condition for DayZero flag changes
Browse files Browse the repository at this point in the history
  • Loading branch information
deeppandya committed Oct 22, 2024
1 parent 97e2174 commit 9f37693
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.chromium.chrome.browser.preferences.ChromeSharedPreferences;

public class DayZeroHelper {
private static final String TAG = "DayZeroMojomHelper";
private static final String TAG = "DayZeroHelper";

@CalledByNative
private static void setDayZeroExptAndroid(boolean shouldShowFeatures) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@
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;
import org.chromium.chrome.R;
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.flags.ChromeFeatureList;
import org.chromium.chrome.browser.day_zero.DayZeroHelper;
import org.chromium.chrome.browser.metrics.ChangeMetricsReportingStateCalledFrom;
import org.chromium.chrome.browser.metrics.UmaSessionStats;
import org.chromium.chrome.browser.onboarding.OnboardingPrefManager;
Expand Down Expand Up @@ -238,12 +237,11 @@ private void onClickViews() {
}

private boolean shouldForceDefaultBrowserPrompt() {
return ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_DAY_ZERO_EXPERIMENT)
&& !isDefaultBrowser();
return !DayZeroHelper.getDayZeroExptFlag() && !isDefaultBrowser();
}

private boolean shouldOfferSearchWidget() {
return ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_DAY_ZERO_EXPERIMENT)
return !DayZeroHelper.getDayZeroExptFlag()
&& BraveSearchWidgetUtils.getShouldShowWidgetPromo(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

#include "base/feature_override.h"
#include "brave/browser/android/background_video/features.h"
#include "brave/browser/android/first_run/features.h"
#include "brave/browser/android/preferences/features.h"
#include "brave/browser/android/safe_browsing/features.h"
#include "brave/browser/brave_browser_features.h"
#include "brave/components/ai_chat/core/common/buildflags/buildflags.h"
Expand Down

0 comments on commit 9f37693

Please sign in to comment.