Merge "Move 'is already always-on' check into Vpn.java" into nyc-dev

This commit is contained in:
Robin Lee
2016-06-16 10:06:10 +00:00
committed by Android (Google) Code Review

View File

@@ -3417,10 +3417,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
Slog.w(TAG, "User " + userId + " has no Vpn configuration"); Slog.w(TAG, "User " + userId + " has no Vpn configuration");
return false; 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)) { if (!vpn.setAlwaysOnPackage(packageName, lockdown)) {
return false; return false;
} }