diff --git a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java index 3d22d6d37c..26eca19b90 100644 --- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java +++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java @@ -41,7 +41,6 @@ import android.widget.Toast; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; -import com.android.internal.notification.SystemNotificationChannels; public class NetworkNotificationManager { @@ -72,7 +71,12 @@ public class NetworkNotificationManager { private static final String TAG = NetworkNotificationManager.class.getSimpleName(); private static final boolean DBG = true; - private static final boolean VDBG = false; + + // 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"; // The context is for the current user (system server) private final Context mContext; @@ -255,8 +259,7 @@ public class NetworkNotificationManager { // the tag. final boolean hasPreviousNotification = previousNotifyType != null; final String channelId = (highPriority && !hasPreviousNotification) - ? SystemNotificationChannels.NETWORK_ALERTS - : SystemNotificationChannels.NETWORK_STATUS; + ? NOTIFICATION_NETWORK_ALERTS : NOTIFICATION_NETWORK_STATUS; Notification.Builder builder = new Notification.Builder(mContext, channelId) .setWhen(System.currentTimeMillis()) .setShowWhen(notifyType == NotificationType.NETWORK_SWITCH)