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

Commit e5cecc1b authored by Sarah Chin's avatar Sarah Chin Committed by Android (Google) Code Review
Browse files

Merge "Allow user to disable network boost notification"

parents 327a2776 ef53f427
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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. -->
+9 −5
Original line number Diff line number Diff line
@@ -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)