Add public alternative for protectFromVpn

The method is called directly by VpnService#protect.

Bug: 171540887
Test: m
Change-Id: I7cbb1ef1301dcf8d27b2cc39c0431a0156fe3442
This commit is contained in:
Remi NGUYEN VAN
2021-02-24 14:45:39 +09:00
parent 88163e28a0
commit da62581840

View File

@@ -91,7 +91,8 @@ public class NetworkUtils {
* this socket will go directly to the underlying network, so its traffic will not be * this socket will go directly to the underlying network, so its traffic will not be
* forwarded through the VPN. * forwarded through the VPN.
*/ */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553,
publicAlternatives = "Use {@link android.net.VpnService#protect} instead.")
public static native boolean protectFromVpn(FileDescriptor fd); public static native boolean protectFromVpn(FileDescriptor fd);
/** /**