From 4ed5cbd7504b205df8e2be1aac2660220b2cbafb Mon Sep 17 00:00:00 2001 From: Pavel Grafov Date: Wed, 30 Jan 2019 19:56:36 +0000 Subject: [PATCH] Nuke old setAlwaysOnVpnPackageForUser method. All callers have migrated to 4-argument one. Test: builds Bug: 77468593 Change-Id: I253515f6b0100b675505646339e5b82d373c9429 --- .../java/android/net/ConnectivityManager.java | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 3bae12e937..f47ada6ae5 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -1033,34 +1033,6 @@ public class ConnectivityManager { } } - /** - * Configures an always-on VPN connection through a specific application. - * This connection is automatically granted and persisted after a reboot. - * - *

The designated package should declare a {@link VpnService} in its - * manifest guarded by {@link android.Manifest.permission.BIND_VPN_SERVICE}, - * otherwise the call will fail. - * - * @param userId The identifier of the user to set an always-on VPN for. - * @param vpnPackage The package name for an installed VPN app on the device, or {@code null} - * to remove an existing always-on VPN configuration. - * @param lockdownEnabled {@code true} to disallow networking when the VPN is not connected or - * {@code false} otherwise. - * @return {@code true} if the package is set as always-on VPN controller; - * {@code false} otherwise. - * @hide - */ - @RequiresPermission(android.Manifest.permission.CONTROL_ALWAYS_ON_VPN) - public boolean setAlwaysOnVpnPackageForUser(int userId, @Nullable String vpnPackage, - boolean lockdownEnabled) { - try { - return mService.setAlwaysOnVpnPackage( - userId, vpnPackage, lockdownEnabled, /* whitelist */ null); - } catch (RemoteException e) { - throw e.rethrowFromSystemServer(); - } - } - /** * Returns the package name of the currently set always-on VPN application. * If there is no always-on VPN set, or the VPN is provided by the system instead