Merge "Allow user to disable network boost notification"
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<string name="ssl_error_continue">Continue anyway via browser</string>
|
||||
|
||||
<!-- Telephony notification channel name for network boost notifications. -->
|
||||
<string name="network_boost_notification_channel">Network Boost</string>
|
||||
<string name="network_boost_notification_channel">Network boost</string>
|
||||
<!-- Notification title text for the network boost notification. -->
|
||||
<string name="network_boost_notification_title">%s recommends a data boost</string>
|
||||
<!-- Notification detail text for the network boost notification. -->
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user