summaryrefslogtreecommitdiffstats
path: root/core/java/android/net/NetworkMisc.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/net/NetworkMisc.java')
-rw-r--r--core/java/android/net/NetworkMisc.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/net/NetworkMisc.java b/core/java/android/net/NetworkMisc.java
index b92c9e3..5511a24 100644
--- a/core/java/android/net/NetworkMisc.java
+++ b/core/java/android/net/NetworkMisc.java
@@ -45,6 +45,13 @@ public class NetworkMisc implements Parcelable {
public boolean explicitlySelected;
/**
+ * Set if the user desires to use this network even if it is unvalidated. This field has meaning
+ * only if {#link explicitlySelected} is true. If it is, this field must also be set to the
+ * appropriate value based on previous user choice.
+ */
+ public boolean acceptUnvalidated;
+
+ /**
* For mobile networks, this is the subscriber ID (such as IMSI).
*/
public String subscriberId;
@@ -56,6 +63,7 @@ public class NetworkMisc implements Parcelable {
if (nm != null) {
allowBypass = nm.allowBypass;
explicitlySelected = nm.explicitlySelected;
+ acceptUnvalidated = nm.acceptUnvalidated;
subscriberId = nm.subscriberId;
}
}
@@ -69,6 +77,7 @@ public class NetworkMisc implements Parcelable {
public void writeToParcel(Parcel out, int flags) {
out.writeInt(allowBypass ? 1 : 0);
out.writeInt(explicitlySelected ? 1 : 0);
+ out.writeInt(acceptUnvalidated ? 1 : 0);
out.writeString(subscriberId);
}
@@ -78,6 +87,7 @@ public class NetworkMisc implements Parcelable {
NetworkMisc networkMisc = new NetworkMisc();
networkMisc.allowBypass = in.readInt() != 0;
networkMisc.explicitlySelected = in.readInt() != 0;
+ networkMisc.acceptUnvalidated = in.readInt() != 0;
networkMisc.subscriberId = in.readString();
return networkMisc;
}