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
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index acf8009..8620b8d 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -3417,10 +3417,6 @@
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;
}