Remove VPN Overflow menu
- Move always-on option for legacy vpn into the legacy vpn config page - This implementation doesn't show dialogue when replacing existing always-on vpn - Continue to disable lockdown option for legacy vpn when "persist.radio.imsregrequired" is true. Not applying to vpn app - Force to save account info when legacy vpn is always-on - When legacy vpn is always-on, don't try to connect. (Otherwise, an exception is thrown) TODO: Remove EXTRA_PICK_LOCKDOWN in LockdownVpnTracker in framework Bug: 26950700 Change-Id: Ia80669359c0b7cdb955c84937156c020ac6e9af5
This commit is contained in:
@@ -80,7 +80,6 @@ public class VpnSettings extends RestrictedSettingsFragment implements
|
||||
private static final int RESCAN_MESSAGE = 0;
|
||||
private static final int RESCAN_INTERVAL_MS = 1000;
|
||||
|
||||
private static final String EXTRA_PICK_LOCKDOWN = "android.net.vpn.PICK_LOCKDOWN";
|
||||
private static final NetworkRequest VPN_REQUEST = new NetworkRequest.Builder()
|
||||
.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)
|
||||
.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)
|
||||
@@ -143,11 +142,6 @@ public class VpnSettings extends RestrictedSettingsFragment implements
|
||||
menu.getItem(i).setEnabled(!mUnavailable);
|
||||
}
|
||||
}
|
||||
|
||||
// Hide lockdown VPN on devices that require IMS authentication
|
||||
if (SystemProperties.getBoolean("persist.radio.imsregrequired", false)) {
|
||||
menu.findItem(R.id.vpn_lockdown).setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -163,10 +157,6 @@ public class VpnSettings extends RestrictedSettingsFragment implements
|
||||
ConfigDialogFragment.show(this, profile, true /* editing */, false /* exists */);
|
||||
return true;
|
||||
}
|
||||
case R.id.vpn_lockdown: {
|
||||
LockdownConfigFragment.show(this);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
@@ -186,12 +176,6 @@ public class VpnSettings extends RestrictedSettingsFragment implements
|
||||
getEmptyTextView().setText(R.string.vpn_no_vpns_added);
|
||||
}
|
||||
|
||||
final boolean pickLockdown = getActivity()
|
||||
.getIntent().getBooleanExtra(EXTRA_PICK_LOCKDOWN, false);
|
||||
if (pickLockdown) {
|
||||
LockdownConfigFragment.show(this);
|
||||
}
|
||||
|
||||
// Start monitoring
|
||||
mConnectivityManager.registerNetworkCallback(VPN_REQUEST, mNetworkCallback);
|
||||
|
||||
|
Reference in New Issue
Block a user