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