Merge "Create a new string to alert unsupported vpn start." into main am: 3c569b5379

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2831551

Change-Id: I6ee70a33d9c5739ee2e44dcef8158c5f2b7767e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 91ac468..7118886 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -6252,6 +6252,11 @@
 
     <!-- Dialog subtitle warning for a VPN app that has an insecure type. [CHAR LIMIT=100]  -->
     <string name="vpn_insecure_dialog_subtitle">Not secure. Update to an IKEv2 VPN</string>
+    <!-- Dialog message when user attempted to start a VPN type that is no longer supported. It is
+         very unlikely, but not impossible, that a user has a very old VPN configuration that the
+         newer device no longer supports. This message is displayed when the user tries to start
+         this unsupported VPN. [CHAR LIMIT=NONE]  -->
+    <string name="vpn_start_unsupported">Failed to start unsupported VPN.</string>
 
     <!-- Summary describing the always-on VPN feature. [CHAR LIMIT=NONE] -->
     <string name="vpn_lockdown_summary">Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN.</string>
diff --git a/src/com/android/settings/vpn2/ConfigDialogFragment.java b/src/com/android/settings/vpn2/ConfigDialogFragment.java
index 860fc4e..559003a 100644
--- a/src/com/android/settings/vpn2/ConfigDialogFragment.java
+++ b/src/com/android/settings/vpn2/ConfigDialogFragment.java
@@ -209,8 +209,8 @@
                 Toast.makeText(mContext, R.string.vpn_no_network, Toast.LENGTH_LONG).show();
             } catch (UnsupportedOperationException e) {
                 Log.e(TAG, "Attempted to start an unsupported VPN type.");
-                final AlertDialog dialog = new AlertDialog.Builder(mContext)
-                        .setMessage(R.string.vpn_insecure_dialog_subtitle)
+                final AlertDialog unusedDialog = new AlertDialog.Builder(mContext)
+                        .setMessage(R.string.vpn_start_unsupported)
                         .setPositiveButton(android.R.string.ok, null)
                         .show();
             }