Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mherrmann committed Sep 24, 2024
1 parent c19a227 commit 356d4bd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,11 @@ private void showIntroPage() {
setLeafAnimation(mVLeafAlignTop, mIvLeafTop, 1f, margin, true);
setLeafAnimation(mVLeafAlignBottom, mIvLeafBottom, 1f, margin, false);
if (mTvWelcome != null) {
mTvWelcome.animate().alpha(1f).setDuration(200).withEndAction(
() -> mTvWelcome.setVisibility(View.VISIBLE));
mTvWelcome
.animate()
.alpha(1f)
.setDuration(200)
.withEndAction(() -> mTvWelcome.setVisibility(View.VISIBLE));
}
if (mIvBrave != null) {
mIvBrave.animate().scaleX(0.8f).scaleY(0.8f).setDuration(1000);
Expand Down Expand Up @@ -344,12 +347,10 @@ private void showBrowserSelectionPage() {
String countryCode = Locale.getDefault().getCountry();
if (countryCode.equals(BraveConstants.INDIA_COUNTRY_CODE)) {
if (mTvCard != null) {
mTvCard.setText(
getResources().getString(R.string.privacy_onboarding_india));
mTvCard.setText(getResources().getString(R.string.privacy_onboarding_india));
}
if (mTvDefault != null) {
mTvDefault.setText(
getResources().getString(R.string.onboarding_set_default_india));
mTvDefault.setText(getResources().getString(R.string.onboarding_set_default_india));
}
}
}
Expand Down Expand Up @@ -391,8 +392,9 @@ private void showAnalyticsConsentPage() {
} else {
boolean isCrashReporting = false;
try {
isCrashReporting = PrivacyPreferencesManagerImpl.getInstance()
.isUsageAndCrashReportingPermittedByUser();
isCrashReporting =
PrivacyPreferencesManagerImpl.getInstance()
.isUsageAndCrashReportingPermittedByUser();

} catch (Exception e) {
Log.e(TAG, "isCrashReportingOnboarding: " + e.getMessage());
Expand All @@ -406,10 +408,10 @@ private void showAnalyticsConsentPage() {
mCheckboxCrash.setOnCheckedChangeListener(
new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(
CompoundButton buttonView, boolean isChecked) {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
try {
UmaSessionStats.changeMetricsReportingConsent(isChecked,
UmaSessionStats.changeMetricsReportingConsent(
isChecked,
ChangeMetricsReportingStateCalledFrom.UI_FIRST_RUN);
} catch (Exception e) {
Log.e(TAG, "CrashReportingOnboarding: " + e.getMessage());
Expand All @@ -431,13 +433,11 @@ public void onCheckedChanged(
mCheckboxP3a.setOnCheckedChangeListener(
new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(
CompoundButton buttonView, boolean isChecked) {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
try {
BraveLocalState.get().setBoolean(
BravePref.P3A_ENABLED, isChecked);
BraveLocalState.get().setBoolean(
BravePref.P3A_NOTICE_ACKNOWLEDGED, true);
BraveLocalState.get().setBoolean(BravePref.P3A_ENABLED, isChecked);
BraveLocalState.get()
.setBoolean(BravePref.P3A_NOTICE_ACKNOWLEDGED, true);
BraveLocalState.commitPendingWrite();
} catch (Exception e) {
Log.e(TAG, "P3aOnboarding: " + e.getMessage());
Expand Down
15 changes: 8 additions & 7 deletions browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,14 @@
kOsAndroid, \
FEATURE_VALUE_TYPE(safe_browsing::features::kBraveAndroidSafeBrowsing), \
})
#define ANDROID_FORCE_DEFAULT_BROWSER_PROMPT \
EXPAND_FEATURE_ENTRIES({ \
"force-default-browser-prompt", \
"Force default browser prompt", \
"Forces a default browser prompt on first run.", \
kOsAndroid, \
FEATURE_VALUE_TYPE(first_run::features::kAndroidForceDefaultBrowserPrompt), \
#define ANDROID_FORCE_DEFAULT_BROWSER_PROMPT \
EXPAND_FEATURE_ENTRIES({ \
"force-default-browser-prompt", \
"Force default browser prompt", \
"Forces a default browser prompt on first run.", \
kOsAndroid, \
FEATURE_VALUE_TYPE( \
first_run::features::kAndroidForceDefaultBrowserPrompt), \
})
#else
#define BRAVE_BACKGROUND_VIDEO_PLAYBACK_ANDROID
Expand Down

0 comments on commit 356d4bd

Please sign in to comment.