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

Commit 26ee9414 authored by Nate Myren's avatar Nate Myren
Browse files

Created developer_important notification channel

Created a high-importance developer notification channel for developer
messages that should notify the user with high importance. Assigned the
"USB debugging" permission to this channel.

Test: None
Fixes: 132904226
Change-Id: I9bc5361d806830d1820b8d998b4e0866462cdb37
parent 03482921
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ public class SystemNotificationChannels {
    public static String CAR_MODE = "CAR_MODE";
    public static String ACCOUNT = "ACCOUNT";
    public static String DEVELOPER = "DEVELOPER";
    public static String DEVELOPER_IMPORTANT = "DEVELOPER_IMPORTANT";
    public static String UPDATES = "UPDATES";
    public static String NETWORK_STATUS = "NETWORK_STATUS";
    public static String NETWORK_ALERTS = "NETWORK_ALERTS";
@@ -98,6 +99,13 @@ public class SystemNotificationChannels {
        developer.setBlockableSystem(true);
        channelsList.add(developer);

        final NotificationChannel developerImportant = new NotificationChannel(
                DEVELOPER_IMPORTANT,
                context.getString(R.string.notification_channel_developer_important),
                NotificationManager.IMPORTANCE_HIGH);
        developer.setBlockableSystem(true);
        channelsList.add(developerImportant);

        final NotificationChannel updates = new NotificationChannel(
                UPDATES,
                context.getString(R.string.notification_channel_updates),
+3 −0
Original line number Diff line number Diff line
@@ -621,6 +621,9 @@
    <!-- Text shown when viewing channel settings for notifications related to developers -->
    <string name="notification_channel_developer">Developer messages</string>

    <!-- Text shown when viewing channel settings for high importance notifications related to developers [CHAR LIMIT=60]-->
    <string name="notification_channel_developer_important">Important developer messages</string>

    <!-- Text shown when viewing channel settings for notifications related to system updates -->
    <string name="notification_channel_updates">Updates</string>

+1 −0
Original line number Diff line number Diff line
@@ -3419,6 +3419,7 @@
  <java-symbol type="string" name="notification_channel_car_mode" />
  <java-symbol type="string" name="notification_channel_account" />
  <java-symbol type="string" name="notification_channel_developer" />
  <java-symbol type="string" name="notification_channel_developer_important" />
  <java-symbol type="string" name="notification_channel_updates" />
  <java-symbol type="string" name="notification_channel_network_status" />
  <java-symbol type="string" name="notification_channel_network_alerts" />
+2 −1
Original line number Diff line number Diff line
@@ -1196,7 +1196,8 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
                            intent, 0, null, UserHandle.CURRENT);

                    Notification notification =
                            new Notification.Builder(mContext, SystemNotificationChannels.DEVELOPER)
                            new Notification.Builder(mContext,
                                    SystemNotificationChannels.DEVELOPER_IMPORTANT)
                                    .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
                                    .setWhen(0)
                                    .setOngoing(true)