diff options
| author | 2017-01-09 18:39:30 +0000 | |
|---|---|---|
| committer | 2017-01-09 18:39:34 +0000 | |
| commit | 09ca5f52a02ff33d79bf8e7ff045130d6bd3316c (patch) | |
| tree | b7ad2ca924d9bfe4883327bffa9a82f80ad70752 | |
| parent | a2b61657c4bfbc9d13cf1414c2eb7a1f99557d3e (diff) | |
| parent | 5ac6650d4aa8dd6fa16a568bd86b0e38aca32161 (diff) | |
Merge "Expose fields in WifiConfiguration."
| -rw-r--r-- | api/system-current.txt | 2 | ||||
| -rw-r--r-- | wifi/java/android/net/wifi/WifiConfiguration.java | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index a9308dbe28f5..14a767ba038c 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -27307,6 +27307,8 @@ package android.net.wifi { public class WifiConfiguration implements android.os.Parcelable { ctor public WifiConfiguration(); method public int describeContents(); + method public boolean hasNoInternetAccess(); + method public boolean isNoInternetAccessExpected(); method public boolean isPasspoint(); method public void writeToParcel(android.os.Parcel, int); field public java.lang.String BSSID; diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 3b7f7216c147..958279badf75 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -608,6 +608,7 @@ public class WifiConfiguration implements Parcelable { * if there has been a report of it having no internet access, and, it never have had * internet access in the past. */ + @SystemApi public boolean hasNoInternetAccess() { return numNoInternetAccessReports > 0 && !validatedInternetAccess; } @@ -621,6 +622,17 @@ public class WifiConfiguration implements Parcelable { public boolean noInternetAccessExpected; /** + * 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 + */ + @SystemApi + public boolean isNoInternetAccessExpected() { + return noInternetAccessExpected; + } + + /** * @hide * Last time the system was connected to this configuration. */ |