diff --git a/packages/CarrierDefaultApp/res/values/strings.xml b/packages/CarrierDefaultApp/res/values/strings.xml index 8a19709589fd4..3dcdf00ca8f5c 100644 --- a/packages/CarrierDefaultApp/res/values/strings.xml +++ b/packages/CarrierDefaultApp/res/values/strings.xml @@ -15,7 +15,7 @@ Continue anyway via browser - Network Boost + Network boost %s recommends a data boost diff --git a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/SlicePurchaseBroadcastReceiver.java b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/SlicePurchaseBroadcastReceiver.java index dd7b218959bf4..b322b8bd95bb2 100644 --- a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/SlicePurchaseBroadcastReceiver.java +++ b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/SlicePurchaseBroadcastReceiver.java @@ -240,11 +240,15 @@ public class SlicePurchaseBroadcastReceiver extends BroadcastReceiver{ return; } - context.getSystemService(NotificationManager.class).createNotificationChannel( - new NotificationChannel(NETWORK_BOOST_NOTIFICATION_CHANNEL_ID, - context.getResources().getString( - R.string.network_boost_notification_channel), - NotificationManager.IMPORTANCE_DEFAULT)); + NotificationChannel channel = new NotificationChannel( + NETWORK_BOOST_NOTIFICATION_CHANNEL_ID, + context.getResources().getString(R.string.network_boost_notification_channel), + NotificationManager.IMPORTANCE_DEFAULT); + // CarrierDefaultApp notifications are unblockable by default. Make this channel blockable + // to allow users to disable notifications posted to this channel without affecting other + // notifications in this application. + channel.setBlockable(true); + context.getSystemService(NotificationManager.class).createNotificationChannel(channel); Notification notification = new Notification.Builder(context, NETWORK_BOOST_NOTIFICATION_CHANNEL_ID)