Merge "Populate ipsecSecret field in VpnProfile"

This commit is contained in:
Chiachang Wang
2023-04-13 08:53:57 +00:00
committed by Gerrit Code Review

View File

@@ -653,10 +653,14 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
profile.ipsecSecret = mIpsecSecret.getText().toString();
break;
case VpnProfile.TYPE_IKEV2_IPSEC_RSA:
if (mIpsecUserCert.getSelectedItemPosition() != 0) {
profile.ipsecSecret = (String) mIpsecUserCert.getSelectedItem();
}
// fall through
case VpnProfile.TYPE_L2TP_IPSEC_RSA:
profile.l2tpSecret = mL2tpSecret.getText().toString();
// fall through
case VpnProfile.TYPE_IKEV2_IPSEC_RSA: // fall through
case VpnProfile.TYPE_IPSEC_XAUTH_RSA:
if (mIpsecUserCert.getSelectedItemPosition() != 0) {
profile.ipsecUserCert = (String) mIpsecUserCert.getSelectedItem();