Legacy VPN Configuration Dialog includes error message if VPN is an

insecure type.

Screenshot: https://screenshot.googleplex.com/53pAJuhTDLJW4Em
Bug: 176821216
Test: atest SettingsUnitTests

Change-Id: I528d46654a39df04b647d6d0137aaf80e7adb05c
Merged-In: I528d46654a39df04b647d6d0137aaf80e7adb05c
(cherry picked from commit 5d92ad5232)
This commit is contained in:
Jeremy Goldman
2021-03-11 13:57:23 +08:00
parent 006b8db0b6
commit 222dd91102
3 changed files with 232 additions and 187 deletions

View File

@@ -204,10 +204,16 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
configureAdvancedOptionsVisibility();
// Create a button to forget the profile if it has already been saved..
if (mExists) {
// Create a button to forget the profile if it has already been saved..
setButton(DialogInterface.BUTTON_NEUTRAL,
context.getString(R.string.vpn_forget), mListener);
// Display warning subtitle if the existing VPN is an insecure type...
if (VpnProfile.isLegacyType(mProfile.type)) {
TextView subtitle = mView.findViewById(R.id.dialog_alert_subtitle);
subtitle.setVisibility(View.VISIBLE);
}
}
// Create a button to save the profile.