mirror of
https://gitlab.com/xynngh/YetAnotherCallBlocker.git
synced 2025-02-10 08:40:46 +01:00
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…
x
Reference in New Issue
Block a user