Skip to content

Commit

Permalink
Improve method name
Browse files Browse the repository at this point in the history
  • Loading branch information
mherrmann committed Sep 24, 2024
1 parent 813481f commit 34d5425
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private void onClickViews() {
mBtnPositive.setOnClickListener(
view -> {
if (mCurrentStep == 1 && !isDefaultBrowser()) {
setDefaultBrowser();
setDefaultBrowserAndProceedToNextStep();
} else {
nextOnboardingStep();
}
Expand All @@ -238,11 +238,12 @@ private boolean shouldForceDefaultBrowserPrompt() {
BraveFeatureList.ANDROID_FORCE_DEFAULT_BROWSER_PROMPT);
}

private void setDefaultBrowser() {
private void setDefaultBrowserAndProceedToNextStep() {
BraveSetDefaultBrowserUtils.setDefaultBrowser(this);
if (!BraveSetDefaultBrowserUtils.supportsDefaultRoleManager()) {
nextOnboardingStep();
}
// onActivityResult will call nextOnboardingStep().
}

private boolean isDefaultBrowser() {
Expand Down Expand Up @@ -296,7 +297,7 @@ public void run() {
}
} else if (mCurrentStep == 1) {
if (shouldForceDefaultBrowserPrompt()) {
setDefaultBrowser();
setDefaultBrowserAndProceedToNextStep();
} else {
int margin = mIsTablet ? 200 : 30;
setLeafAnimation(mVLeafAlignTop, mIvLeafTop, 1.3f, margin, true);
Expand Down

0 comments on commit 34d5425

Please sign in to comment.