Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5ea7d58 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Reset VPN settings by calling VpnManager.

Currently, ConnectivityManager#factoryReset calls
VpnManager#factoryReset. Call the VpnManager method directly so
it can be removed from ConnectivityManager.

Bug: 173331190
Test: atest SettingsRoboTests
Change-Id: I7c702a627cd448dbde40e0d885fbc570ecd1e55d
parent 65128bab
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.content.Context;
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 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
                connectivityManager.factoryReset();
            }

            VpnManager vpnManager = mContext.getSystemService(VpnManager.class);
            if (vpnManager != null) {
                vpnManager.factoryReset();
            }

            WifiManager wifiManager = (WifiManager)
                    mContext.getSystemService(Context.WIFI_SERVICE);
            if (wifiManager != null) {