Skip to content

Commit

Permalink
Uplift of #16090 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-browser-releases committed Nov 28, 2022
1 parent aed4d2e commit 8ed8726
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,19 @@ private void showNotificationWarningDialog() {

private void notificationClick() {
Preference notifications = findPreference(PREF_NOTIFICATIONS);
notifications.setOnPreferenceClickListener(preference -> {
mNotificationClicked = true;

Intent intent = new Intent();
intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE,
ContextUtils.getApplicationContext().getPackageName());
startActivity(intent);
// We handle the click so the default action isn't triggered.
return true;
});
if (notifications != null) {
notifications.setOnPreferenceClickListener(preference -> {
mNotificationClicked = true;

Intent intent = new Intent();
intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE,
ContextUtils.getApplicationContext().getPackageName());
startActivity(intent);
// We handle the click so the default action isn't triggered.
return true;
});
}
}

private void updateBravePreferences() {
Expand Down

0 comments on commit 8ed8726

Please sign in to comment.