Init notification channels before opening notification settings
This commit is contained in:
parent
fb1029ee71
commit
f816f2637d
|
@ -297,7 +297,7 @@ public class NotificationHelper {
|
|||
ReviewsActivity.getNumberIntent(context, numberInfo.number)));
|
||||
}
|
||||
|
||||
private static void initNotificationChannels(Context context) {
|
||||
public static void initNotificationChannels(Context context) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return;
|
||||
|
||||
if (notificationChannelsInitialized) return;
|
||||
|
|
|
@ -172,6 +172,8 @@ public class RootSettingsFragment extends BaseSettingsFragment {
|
|||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
requirePreference(PREF_NOTIFICATION_CHANNEL_SETTINGS)
|
||||
.setOnPreferenceClickListener(preference -> {
|
||||
NotificationHelper.initNotificationChannels(requireContext());
|
||||
|
||||
Intent intent = new Intent(
|
||||
android.provider.Settings.ACTION_APP_NOTIFICATION_SETTINGS);
|
||||
intent.putExtra(android.provider.Settings.EXTRA_APP_PACKAGE,
|
||||
|
|
Loading…
Reference in New Issue