Merge "Less intrusive VPN dialog and other UX tweaks." into lmp-dev

This commit is contained in:
Jeff Davidson
2014-08-20 23:59:29 +00:00
committed by Android (Google) Code Review
2 changed files with 16 additions and 0 deletions

View File

@@ -108,6 +108,8 @@ interface IConnectivityManager
boolean prepareVpn(String oldPackage, String newPackage);
void setVpnPackageAuthorization(boolean authorized);
ParcelFileDescriptor establishVpn(in VpnConfig config);
VpnConfig getVpnConfig();

View File

@@ -2662,6 +2662,20 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
}
/**
* Set whether the current VPN package has the ability to launch VPNs without
* user intervention. This method is used by system UIs and not available
* in ConnectivityManager. Permissions are checked in Vpn class.
* @hide
*/
@Override
public void setVpnPackageAuthorization(boolean authorized) {
int user = UserHandle.getUserId(Binder.getCallingUid());
synchronized(mVpns) {
mVpns.get(user).setPackageAuthorization(authorized);
}
}
/**
* Configure a TUN interface and return its file descriptor. Parameters
* are encoded and opaque to this class. This method is used by VpnBuilder