Merge "Add unit tests related to data accounting for VPNs with one underlying network." am: 289759e0d2 am: dd9d8de53b
am: cf038bfcd1
Change-Id: I80e3ebb556ac0b6bff5d232b881f7d869cb74f00
This commit is contained in:
@@ -40,6 +40,7 @@ import android.os.Parcelable;
|
|||||||
import android.util.BackupUtils;
|
import android.util.BackupUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.internal.util.ArrayUtils;
|
import com.android.internal.util.ArrayUtils;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
@@ -89,10 +90,22 @@ public class NetworkTemplate implements Parcelable {
|
|||||||
|
|
||||||
private static boolean sForceAllNetworkTypes = false;
|
private static boolean sForceAllNetworkTypes = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Results in matching against all mobile network types.
|
||||||
|
*
|
||||||
|
* <p>See {@link #matchesMobile} and {@link matchesMobileWildcard}.
|
||||||
|
*/
|
||||||
|
@VisibleForTesting
|
||||||
public static void forceAllNetworkTypes() {
|
public static void forceAllNetworkTypes() {
|
||||||
sForceAllNetworkTypes = true;
|
sForceAllNetworkTypes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Resets the affect of {@link #forceAllNetworkTypes}. */
|
||||||
|
@VisibleForTesting
|
||||||
|
public static void resetForceAllNetworkTypes() {
|
||||||
|
sForceAllNetworkTypes = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template to match {@link ConnectivityManager#TYPE_MOBILE} networks with
|
* Template to match {@link ConnectivityManager#TYPE_MOBILE} networks with
|
||||||
* the given IMSI.
|
* the given IMSI.
|
||||||
|
|||||||
Reference in New Issue
Block a user