aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/android/internal/telephony/util/NotificationChannelController.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/android/internal/telephony/util/NotificationChannelController.java')
-rw-r--r--src/java/com/android/internal/telephony/util/NotificationChannelController.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/java/com/android/internal/telephony/util/NotificationChannelController.java b/src/java/com/android/internal/telephony/util/NotificationChannelController.java
index 9967b05dc..54d7d1abd 100644
--- a/src/java/com/android/internal/telephony/util/NotificationChannelController.java
+++ b/src/java/com/android/internal/telephony/util/NotificationChannelController.java
@@ -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);