From fb441f50093bcc3476a33a2b63abf61d355f2eaa Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Fri, 3 Feb 2017 12:51:40 -0800 Subject: WifiManager: API upates for O Deprecate the following API's: 1. pingSupplicant() - We don't want apps trying to figure out if wpa_supplicant is running or not. It should not be something that apps need to know. 2. saveConfiguration() - No longer needed, we automatically persist data when needed. Other changes: 1. Reworded the docstrings to remove direct reference to wpa_supplicant for network configuration related API's. 2. We no longer allow apps to modfiy network configuration of other apps. Added a docstring explaining that in the 3 modify API's. 3. Changed the wording of enableNetwork's |disableOthers| flag. Bug: 31146757 Test: make update-api Change-Id: If970d85146de3532072191cb2b7ecb0d5adb2774 --- api/current.txt | 4 +- api/system-current.txt | 4 +- api/test-current.txt | 4 +- wifi/java/android/net/wifi/WifiManager.java | 72 +++++++++++++++++------------ 4 files changed, 49 insertions(+), 35 deletions(-) diff --git a/api/current.txt b/api/current.txt index 8bfb6f41d9d1..72351443ea1e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -24788,13 +24788,13 @@ package android.net.wifi { method public boolean isScanAlwaysAvailable(); method public boolean isTdlsSupported(); method public boolean isWifiEnabled(); - method public boolean pingSupplicant(); + method public deprecated boolean pingSupplicant(); method public void queryPasspointIcon(long, java.lang.String); method public boolean reassociate(); method public boolean reconnect(); method public boolean removeNetwork(int); method public boolean removePasspointConfiguration(java.lang.String); - method public boolean saveConfiguration(); + method public deprecated boolean saveConfiguration(); method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiEnabled(boolean); diff --git a/api/system-current.txt b/api/system-current.txt index dc50647bf984..e1a45685b086 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -27172,13 +27172,13 @@ package android.net.wifi { method public boolean isWifiApEnabled(); method public boolean isWifiEnabled(); method public boolean isWifiScannerSupported(); - method public boolean pingSupplicant(); + method public deprecated boolean pingSupplicant(); method public void queryPasspointIcon(long, java.lang.String); method public boolean reassociate(); method public boolean reconnect(); method public boolean removeNetwork(int); method public boolean removePasspointConfiguration(java.lang.String); - method public boolean saveConfiguration(); + method public deprecated boolean saveConfiguration(); method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration); diff --git a/api/test-current.txt b/api/test-current.txt index cae2899f0258..a9af7f3b2ab0 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -24861,13 +24861,13 @@ package android.net.wifi { method public boolean isScanAlwaysAvailable(); method public boolean isTdlsSupported(); method public boolean isWifiEnabled(); - method public boolean pingSupplicant(); + method public deprecated boolean pingSupplicant(); method public void queryPasspointIcon(long, java.lang.String); method public boolean reassociate(); method public boolean reconnect(); method public boolean removeNetwork(int); method public boolean removePasspointConfiguration(java.lang.String); - method public boolean saveConfiguration(); + method public deprecated boolean saveConfiguration(); method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiEnabled(boolean); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 3fb8ef3e2de3..ed6a166d3fc6 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -838,7 +838,8 @@ public class WifiManager { } /** - * Return a list of all the networks configured in the supplicant. + * Return a list of all the networks configured for the current foreground + * user. * Not all fields of WifiConfiguration are returned. Only the following * fields are filled in: *