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

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie4310decabc5f997e79a736b82581b8b47ed8b0d
diff --git a/src/com/android/settings/ResetNetworkConfirm.java b/src/com/android/settings/ResetNetworkConfirm.java
index 6856a5a..d625251 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;
@@ -93,6 +94,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) {