From 4b6b7987a1d3c5305147144db0848048e425fcf3 Mon Sep 17 00:00:00 2001 From: lucaslin Date: Mon, 18 Apr 2022 13:53:29 +0800 Subject: [PATCH] Modify javadoc for some extra values of VpnManager event The underlying network, NetworkCapabilities and LinkProperties are not necessary to send to VPN app since the purpose of CATEGORY_EVENT_DEACTIVATED_BY_USER and CATEGORY_EVENT_ALWAYS_ON_STATE_CHANGED are to notify VPN app that VPN is deactivated by the user or VPN always-on status is changed. Bug: 191413541 Test: Javadoc only changes. Change-Id: I7fd4b6dad1a4363336f03c217e635fc45bcd0ab6 --- core/java/android/net/VpnManager.java | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/core/java/android/net/VpnManager.java b/core/java/android/net/VpnManager.java index ae7d91f92cb74..37eb74a58235e 100644 --- a/core/java/android/net/VpnManager.java +++ b/core/java/android/net/VpnManager.java @@ -187,14 +187,24 @@ public class VpnManager { /** * The network that was underlying the VPN when the event occurred, as a {@link Network}. * - * This extra will be null if there was no underlying network at the time of the event. + *

This extra will be null if there was no underlying network at the time of the event, or + * the underlying network has no bearing on the event, as in the case of: + *

*/ public static final String EXTRA_UNDERLYING_NETWORK = "android.net.extra.UNDERLYING_NETWORK"; /** * The {@link NetworkCapabilities} of the underlying network when the event occurred. * - * This extra will be null if there was no underlying network at the time of the event. + *

This extra will be null if there was no underlying network at the time of the event, or + * the underlying network has no bearing on the event, as in the case of: + *

*/ public static final String EXTRA_UNDERLYING_NETWORK_CAPABILITIES = "android.net.extra.UNDERLYING_NETWORK_CAPABILITIES"; @@ -202,7 +212,12 @@ public class VpnManager { /** * The {@link LinkProperties} of the underlying network when the event occurred. * - * This extra will be null if there was no underlying network at the time of the event. + *

This extra will be null if there was no underlying network at the time of the event, or + * the underlying network has no bearing on the event, as in the case of: + *

*/ public static final String EXTRA_UNDERLYING_LINK_PROPERTIES = "android.net.extra.UNDERLYING_LINK_PROPERTIES";