Merge "Less intrusive VPN dialog and other UX tweaks." into lmp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d89d8ecff8
@@ -108,6 +108,8 @@ interface IConnectivityManager
|
||||
|
||||
boolean prepareVpn(String oldPackage, String newPackage);
|
||||
|
||||
void setVpnPackageAuthorization(boolean authorized);
|
||||
|
||||
ParcelFileDescriptor establishVpn(in VpnConfig config);
|
||||
|
||||
VpnConfig getVpnConfig();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user