Merge "Reset VPN settings by calling VpnManager." am: be4a0e84ef am: 9e072f09a0 am: e584f62ac4

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I24d89cb5138f86d86a0981b7580f52c50b70133b
diff --git a/src/com/android/settings/ResetNetworkConfirm.java b/src/com/android/settings/ResetNetworkConfirm.java
index 43f35a6..f79bdb2 100644
--- a/src/com/android/settings/ResetNetworkConfirm.java
+++ b/src/com/android/settings/ResetNetworkConfirm.java
@@ -28,6 +28,7 @@
 import android.net.ConnectivityManager;
 import android.net.NetworkPolicyManager;
 import android.net.Uri;
+import android.net.VpnManager;
 import android.net.wifi.WifiManager;
 import android.net.wifi.p2p.WifiP2pManager;
 import android.os.AsyncTask;
@@ -101,6 +102,11 @@
                 connectivityManager.factoryReset();
             }
 
+            VpnManager vpnManager = mContext.getSystemService(VpnManager.class);
+            if (vpnManager != null) {
+                vpnManager.factoryReset();
+            }
+
             WifiManager wifiManager = (WifiManager)
                     mContext.getSystemService(Context.WIFI_SERVICE);
             if (wifiManager != null) {