summaryrefslogtreecommitdiffstats
path: root/wifi/java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2015-04-06 17:26:10 +0900
committerLorenzo Colitti <lorenzo@google.com>2015-04-15 13:38:22 +0900
commit1248dd3c296a94457d5864b7f433335f32490b50 (patch)
treeff2e8ed6a8434d729fa72c98d9a204122762871f /wifi/java
parente03c3c7edf54854ed22adf1e55b27b2408c4c66a (diff)
downloadframeworks_base-1248dd3c296a94457d5864b7f433335f32490b50.zip
frameworks_base-1248dd3c296a94457d5864b7f433335f32490b50.tar.gz
frameworks_base-1248dd3c296a94457d5864b7f433335f32490b50.tar.bz2
Add a noInternetAccessExpected boolean to WifiConfiguration.
This will be set if the user explicitly confirms a connection to a Wi-Fi network without Internet access and checks the "don't ask again" box. Bug: 20081183 Change-Id: I75223ae41dbf0d3a827527a0a131855d8eb4c515
Diffstat (limited to 'wifi/java')
-rw-r--r--wifi/java/android/net/wifi/WifiConfiguration.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index 547b33d..c6f2991 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -691,6 +691,14 @@ public class WifiConfiguration implements Parcelable {
}
/**
+ * The WiFi configuration is expected not to have Internet access (e.g., a wireless printer, a
+ * Chromecast hotspot, etc.). This will be set if the user explicitly confirms a connection to
+ * this configuration and selects "don't ask again".
+ * @hide
+ */
+ public boolean noInternetAccessExpected;
+
+ /**
* @hide
* Last time we blacklisted the configuration
*/
@@ -1137,6 +1145,7 @@ public class WifiConfiguration implements Parcelable {
sbuf.append(" lcuid=" + lastConnectUid);
sbuf.append(" userApproved=" + userApprovedAsString(userApproved));
sbuf.append(" noInternetAccessExpected=" + noInternetAccessExpected);
+ sbuf.append(" ");
if (this.lastConnected != 0) {
sbuf.append('\n');
@@ -1547,6 +1556,7 @@ public class WifiConfiguration implements Parcelable {
dirty = source.dirty;
userApproved = source.userApproved;
numNoInternetAccessReports = source.numNoInternetAccessReports;
+ noInternetAccessExpected = source.noInternetAccessExpected;
}
}
@@ -1625,6 +1635,7 @@ public class WifiConfiguration implements Parcelable {
dest.writeInt(autoJoinBailedDueToLowRssi ? 1 : 0);
dest.writeInt(userApproved);
dest.writeInt(numNoInternetAccessReports);
+ dest.writeInt(noInternetAccessExpected ? 1 : 0);
}
/** Implement the Parcelable interface {@hide} */
@@ -1699,6 +1710,7 @@ public class WifiConfiguration implements Parcelable {
config.autoJoinBailedDueToLowRssi = in.readInt() != 0;
config.userApproved = in.readInt();
config.numNoInternetAccessReports = in.readInt();
+ config.noInternetAccessExpected = in.readInt() != 0;
return config;
}