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
This commit is contained in:
Benedict Wong
2019-11-10 03:42:17 -08:00
parent bcd6b8cbca
commit 62e55361a8

View File

@@ -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 +