diff --git a/res/layout/vpn_dialog.xml b/res/layout/vpn_dialog.xml index 73f669b5740..9e264f92d67 100644 --- a/res/layout/vpn_dialog.xml +++ b/res/layout/vpn_dialog.xml @@ -13,218 +13,254 @@ See the License for the specific language governing permissions and limitations under the License. --> - - + - + android:layout_height="wrap_content" + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" + android:id="@+id/dialog_alert_subtitle" + android:text="@string/vpn_insecure_dialog_subtitle" + android:textColor="?android:attr/colorError" + android:visibility="gone" + android:includeFontPadding="false" + android:padding="0dp" /> - + + android:paddingTop="24dp"> - - - - - - - - - - - - + - + android:text="@string/vpn_name" + android:labelFor="@+id/name"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + android:orientation="vertical"> + - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:animateLayoutChanges="true"> + + - - - - - - - - - - - - - - - - - - + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 4dcc1e449d0..befbf724504 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -7061,6 +7061,9 @@ [CHAR LIMIT=40] --> Require VPN connection? + + This VPN is not secure. Update to an IKEv2 VPN + Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN. diff --git a/src/com/android/settings/vpn2/ConfigDialog.java b/src/com/android/settings/vpn2/ConfigDialog.java index 03e3613b9eb..24fb576a818 100644 --- a/src/com/android/settings/vpn2/ConfigDialog.java +++ b/src/com/android/settings/vpn2/ConfigDialog.java @@ -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.