From 64945ac754b9efb397d6527350045306a8416cfa Mon Sep 17 00:00:00 2001 From: lucaslin Date: Tue, 10 Nov 2020 14:54:52 +0800 Subject: [PATCH] Fix the comments left on aosp/1481197 Bug: 172040168 Test: atest FrameworksNetTests Test: Manual test NO_INTERNET, SIGN_IN, PARTIAL_CONNECTIVITY, VPN_ALWAYS_ON notifications. Change-Id: Ibd05366481e6ddadf8b323335c2c35d40d340d0d --- .../connectivity/NetworkNotificationManager.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java index 0563fcd1bf..7f4fb4039d 100644 --- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java @@ -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)