Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbebd475 authored by fionaxu's avatar fionaxu Committed by android-build-merger
Browse files

enable systemBlockable for roaming notification

am: 81cb84b8

Change-Id: I0620abfa32bf4134463f2a11593f186c3cfac082
parents 99075382 81cb84b8
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -58,21 +58,26 @@ public class NotificationChannelController {
        alertChannel.setSound(Settings.System.DEFAULT_NOTIFICATION_URI,
                new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_NOTIFICATION).build());

        final NotificationChannel mobileDataStatusChannel = new NotificationChannel(
                CHANNEL_ID_MOBILE_DATA_STATUS,
                context.getText(R.string.notification_channel_mobile_data_status),
                NotificationManager.IMPORTANCE_LOW);
        // allow users to block notifications from system
        mobileDataStatusChannel.setBlockableSystem(true);

        context.getSystemService(NotificationManager.class)
                .createNotificationChannels(Arrays.asList(
                new NotificationChannel(CHANNEL_ID_CALL_FORWARD,
                        context.getText(R.string.notification_channel_call_forward),
                        NotificationManager.IMPORTANCE_LOW),
                new NotificationChannel(CHANNEL_ID_MOBILE_DATA_STATUS,
                        context.getText(R.string.notification_channel_mobile_data_status),
                        NotificationManager.IMPORTANCE_LOW),
                new NotificationChannel(CHANNEL_ID_SMS,
                        context.getText(R.string.notification_channel_sms),
                        NotificationManager.IMPORTANCE_HIGH),
                new NotificationChannel(CHANNEL_ID_WFC,
                        context.getText(R.string.notification_channel_wfc),
                        NotificationManager.IMPORTANCE_LOW),
                alertChannel));
                alertChannel,
                mobileDataStatusChannel));
        // only for update
        if (getChannel(CHANNEL_ID_VOICE_MAIL, context) != null) {
            migrateVoicemailNotificationSettings(context);