From 8631caa82261df534e22fb9a458a5d4b791e3aca Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Fri, 10 Jun 2016 16:41:10 +0100 Subject: [PATCH] Move 'is already always-on' check into Vpn.java It's with the rest of the logic now and allows checking whether the lockdown state matches, too, which led to a lot of misunderstandings. Fix: 29199431 Change-Id: I94a2c38c4837f9c33b5b9c2becb52eeb7e2a2534 --- .../core/java/com/android/server/ConnectivityService.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index acf8009e34..8620b8da9e 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -3417,10 +3417,6 @@ public class ConnectivityService extends IConnectivityManager.Stub Slog.w(TAG, "User " + userId + " has no Vpn configuration"); return false; } - // If the current VPN package is the same as the new one, this is a no-op - if (TextUtils.equals(packageName, vpn.getAlwaysOnPackage())) { - return true; - } if (!vpn.setAlwaysOnPackage(packageName, lockdown)) { return false; }