Search in sources :

Example 1 with Vpn

use of com.android.server.connectivity.Vpn in project android_frameworks_base by ResurrectionRemix.

the class ConnectivityService method onUserStop.

private void onUserStop(int userId) {
    synchronized (mVpns) {
        Vpn userVpn = mVpns.get(userId);
        if (userVpn == null) {
            loge("Stopped user has no VPN");
            return;
        }
        userVpn.onUserStopped();
        mVpns.delete(userId);
    }
}
Also used : Vpn(com.android.server.connectivity.Vpn)

Example 2 with Vpn

use of com.android.server.connectivity.Vpn in project android_frameworks_base by ResurrectionRemix.

the class ConnectivityService method onUserAdded.

private void onUserAdded(int userId) {
    synchronized (mVpns) {
        final int vpnsSize = mVpns.size();
        for (int i = 0; i < vpnsSize; i++) {
            Vpn vpn = mVpns.valueAt(i);
            vpn.onUserAdded(userId);
        }
    }
}
Also used : Vpn(com.android.server.connectivity.Vpn)

Example 3 with Vpn

use of com.android.server.connectivity.Vpn in project android_frameworks_base by ResurrectionRemix.

the class ConnectivityService method onUserRemoved.

private void onUserRemoved(int userId) {
    synchronized (mVpns) {
        final int vpnsSize = mVpns.size();
        for (int i = 0; i < vpnsSize; i++) {
            Vpn vpn = mVpns.valueAt(i);
            vpn.onUserRemoved(userId);
        }
    }
}
Also used : Vpn(com.android.server.connectivity.Vpn)

Example 4 with Vpn

use of com.android.server.connectivity.Vpn in project android_frameworks_base by ResurrectionRemix.

the class ConnectivityService method getAlwaysOnVpnPackage.

@Override
public String getAlwaysOnVpnPackage(int userId) {
    enforceConnectivityInternalPermission();
    enforceCrossUserPermission(userId);
    synchronized (mVpns) {
        Vpn vpn = mVpns.get(userId);
        if (vpn == null) {
            Slog.w(TAG, "User " + userId + " has no Vpn configuration");
            return null;
        }
        return vpn.getAlwaysOnPackage();
    }
}
Also used : Vpn(com.android.server.connectivity.Vpn)

Example 5 with Vpn

use of com.android.server.connectivity.Vpn in project android_frameworks_base by DirtyUnicorns.

the class ConnectivityService method onUserStop.

private void onUserStop(int userId) {
    synchronized (mVpns) {
        Vpn userVpn = mVpns.get(userId);
        if (userVpn == null) {
            loge("Stopped user has no VPN");
            return;
        }
        userVpn.onUserStopped();
        mVpns.delete(userId);
    }
}
Also used : Vpn(com.android.server.connectivity.Vpn)

Aggregations

Vpn (com.android.server.connectivity.Vpn)55 NetworkPolicyManager.uidRulesToString (android.net.NetworkPolicyManager.uidRulesToString)15 NetworkAgentInfo (com.android.server.connectivity.NetworkAgentInfo)10 ContentResolver (android.content.ContentResolver)5 Network (android.net.Network)5 NetworkCapabilities (android.net.NetworkCapabilities)5 VpnProfile (com.android.internal.net.VpnProfile)5 LockdownVpnTracker (com.android.server.net.LockdownVpnTracker)5 HashMap (java.util.HashMap)5