Loading services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -237,9 +237,15 @@ public class NetworkNotificationManager { + getTransportName(transportType)); + getTransportName(transportType)); return; return; } } // When replacing an existing notification for a given network, don't alert, just silently final String channelId = highPriority ? SystemNotificationChannels.NETWORK_ALERTS : // update the existing notification. Note that setOnlyAlertOnce() will only work for the SystemNotificationChannels.NETWORK_STATUS; // same id, and the id used here is the NotificationType which is different in every type of // notification. This is required because the notification metrics only track the ID but not // the tag. final boolean hasPreviousNotification = previousNotifyType != null; final String channelId = (highPriority && !hasPreviousNotification) ? SystemNotificationChannels.NETWORK_ALERTS : SystemNotificationChannels.NETWORK_STATUS; Notification.Builder builder = new Notification.Builder(mContext, channelId) Notification.Builder builder = new Notification.Builder(mContext, channelId) .setWhen(System.currentTimeMillis()) .setWhen(System.currentTimeMillis()) .setShowWhen(notifyType == NotificationType.NETWORK_SWITCH) .setShowWhen(notifyType == NotificationType.NETWORK_SWITCH) Loading Loading
services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +9 −3 Original line number Original line Diff line number Diff line Loading @@ -237,9 +237,15 @@ public class NetworkNotificationManager { + getTransportName(transportType)); + getTransportName(transportType)); return; return; } } // When replacing an existing notification for a given network, don't alert, just silently final String channelId = highPriority ? SystemNotificationChannels.NETWORK_ALERTS : // update the existing notification. Note that setOnlyAlertOnce() will only work for the SystemNotificationChannels.NETWORK_STATUS; // same id, and the id used here is the NotificationType which is different in every type of // notification. This is required because the notification metrics only track the ID but not // the tag. final boolean hasPreviousNotification = previousNotifyType != null; final String channelId = (highPriority && !hasPreviousNotification) ? SystemNotificationChannels.NETWORK_ALERTS : SystemNotificationChannels.NETWORK_STATUS; Notification.Builder builder = new Notification.Builder(mContext, channelId) Notification.Builder builder = new Notification.Builder(mContext, channelId) .setWhen(System.currentTimeMillis()) .setWhen(System.currentTimeMillis()) .setShowWhen(notifyType == NotificationType.NETWORK_SWITCH) .setShowWhen(notifyType == NotificationType.NETWORK_SWITCH) Loading