field public static final int NET_CAPABILITY_NOT_RESTRICTED = 13; // 0xd
field public static final int NET_CAPABILITY_RCS = 8; // 0x8
field public static final int NET_CAPABILITY_SUPL = 1; // 0x1
+ field public static final int NET_CAPABILITY_TRUSTED = 14; // 0xe
field public static final int NET_CAPABILITY_WIFI_P2P = 6; // 0x6
field public static final int NET_CAPABILITY_XCAP = 9; // 0x9
field public static final int TRANSPORT_BLUETOOTH = 2; // 0x2
* Represents the network's capabilities. If any are specified they will be satisfied
* by any Network that matches all of them.
*/
- private long mNetworkCapabilities = (1 << NET_CAPABILITY_NOT_RESTRICTED);
+ private long mNetworkCapabilities = (1 << NET_CAPABILITY_NOT_RESTRICTED) |
+ (1 << NET_CAPABILITY_TRUSTED);
/**
* Indicates this is a network that has the ability to reach the
*/
public static final int NET_CAPABILITY_NOT_RESTRICTED = 13;
+ /**
+ * Indicates that the user has indicated implicit trust of this network. This
+ * generally means it's a sim-selected carrier, a plugged in ethernet, a paired
+ * BT device or a wifi the user asked to connect to. Untrusted networks
+ * are probably limited to unknown wifi AP. Set by default.
+ */
+ public static final int NET_CAPABILITY_TRUSTED = 14;
+
+
private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS;
- private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_NOT_RESTRICTED;
+ private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_TRUSTED;
/**
* Adds the given capability to this {@code NetworkCapability} instance.
case NET_CAPABILITY_NOT_METERED: capabilities += "NOT_METERED"; break;
case NET_CAPABILITY_INTERNET: capabilities += "INTERNET"; break;
case NET_CAPABILITY_NOT_RESTRICTED: capabilities += "NOT_RESTRICTED"; break;
+ case NET_CAPABILITY_TRUSTED: capabilities += "TRUSTED"; break;
}
if (++i < types.length) capabilities += "&";
}