Merge "Fix the comments left on aosp/1481197" am: 90a764cd5b

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1494036

Change-Id: I7f13f380db5fe30e67be9cedc9429519b9fd4b6e
This commit is contained in:
Lucas Lin
2020-11-17 07:47:54 +00:00
committed by Automerger Merge Worker

View File

@@ -75,10 +75,11 @@ public class NetworkNotificationManager {
private static final boolean DBG = true;
// Notification channels used by ConnectivityService mainline module, it should be aligned with
// SystemNotificationChannels.
public static final String NOTIFICATION_NETWORK_STATUS = "NETWORK_STATUS";
public static final String NOTIFICATION_NETWORK_ALERTS = "NETWORK_ALERTS";
public static final String NOTIFICATION_VPN = "VPN";
// SystemNotificationChannels so the channels are the same as the ones used as the system
// server.
public static final String NOTIFICATION_CHANNEL_NETWORK_STATUS = "NETWORK_STATUS";
public static final String NOTIFICATION_CHANNEL_NETWORK_ALERTS = "NETWORK_ALERTS";
public static final String NOTIFICATION_CHANNEL_VPN = "VPN";
// The context is for the current user (system server)
private final Context mContext;
@@ -263,7 +264,7 @@ public class NetworkNotificationManager {
// the tag.
final boolean hasPreviousNotification = previousNotifyType != null;
final String channelId = (highPriority && !hasPreviousNotification)
? NOTIFICATION_NETWORK_ALERTS : NOTIFICATION_NETWORK_STATUS;
? NOTIFICATION_CHANNEL_NETWORK_ALERTS : NOTIFICATION_CHANNEL_NETWORK_STATUS;
Notification.Builder builder = new Notification.Builder(mContext, channelId)
.setWhen(System.currentTimeMillis())
.setShowWhen(notifyType == NotificationType.NETWORK_SWITCH)