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

Commit 62e55361 authored by Benedict Wong's avatar Benedict Wong
Browse files

Update setVpnPackageAuthorization call with VPN type

This commit updates the Settings to also pass the additional
VPN type for app-based VPNs.

Bug: 144246835
Test: Compiles, manually tested to be working
Change-Id: I10cf17419636c3c30e1ec06bb3e6751cb5c65d9b
Merged-In: I10cf17419636c3c30e1ec06bb3e6751cb5c65d9b
parent bcd6b8cb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageInfo;
import android.net.IConnectivityManager;
import android.net.VpnManager;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -145,7 +146,8 @@ public class AppDialogFragment extends InstrumentedDialogFragment implements App
        }
        final int userId = getUserId();
        try {
            mService.setVpnPackageAuthorization(mPackageInfo.packageName, userId, false);
            mService.setVpnPackageAuthorization(
                    mPackageInfo.packageName, userId, VpnManager.TYPE_VPN_NONE);
            onDisconnect(dialog);
        } catch (RemoteException e) {
            Log.e(TAG, "Failed to forget authorization of " + mPackageInfo.packageName +