Don't show always-on option connecting PPTP vpn
Support for this kind has been taken out so it shouldn't be an option when connecting (it's already not an option when editing). Bug: 28807474 Change-Id: Id3e7be390c6813d091e7f897ac82aaf29042beb8
This commit is contained in:
@@ -316,12 +316,12 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean validate(boolean editing) {
|
private boolean validate(boolean editing) {
|
||||||
if (!editing) {
|
|
||||||
return mUsername.getText().length() != 0 && mPassword.getText().length() != 0;
|
|
||||||
}
|
|
||||||
if (mAlwaysOnVpn.isChecked() && !getProfile().isValidLockdownProfile()) {
|
if (mAlwaysOnVpn.isChecked() && !getProfile().isValidLockdownProfile()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!editing) {
|
||||||
|
return mUsername.getText().length() != 0 && mPassword.getText().length() != 0;
|
||||||
|
}
|
||||||
if (mName.getText().length() == 0 || mServer.getText().length() == 0 ||
|
if (mName.getText().length() == 0 || mServer.getText().length() == 0 ||
|
||||||
!validateAddresses(mDnsServers.getText().toString(), false) ||
|
!validateAddresses(mDnsServers.getText().toString(), false) ||
|
||||||
!validateAddresses(mRoutes.getText().toString(), true)) {
|
!validateAddresses(mRoutes.getText().toString(), true)) {
|
||||||
|
Reference in New Issue
Block a user